UNPKG

pop-has

Version:

Polymorphic has operator for finding whether a collection contains an equivalent value

13 lines (10 loc) 294 B
"use strict"; var objectHas = require("./has"); module.exports = has; function has(object, soughtValue, equals) { if (object && typeof object.has === "function") { return object.has(soughtValue, equals); } else { return objectHas(object, soughtValue, equals); } }