2.2.5 • Published 3 years ago
@extra-object/has.min v2.2.5
Checks if object has a key. :running: :package: :ledger:
Alternatives: has, hasValue, hasEntry, hasSubset, hasPath. Similar: key, keys, has. This is part of package extra-object.
This is browserified, minified version of @extra-object/has. It is exported as global variable object_has. CDN: unpkg, jsDelivr.
object.has(x, k);
// x: an object
// k: key?
const object = require('extra-object');
var x = {a: 1, b: 2, c: -3};
object.has(x, 'd');
// false
object.has(x, 'c');
// true