2.2.10 • Published 4 years ago
@extra-lists/has v2.2.10
Checks if lists has a key. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
Alternatives: has, hasValue, hasEntry, hasSubset, hasPath. Similar: key, keys, has.
This is part of package extra-lists.
lists.has(x, k);
// x: lists
// k: key?
const lists = require('extra-lists');
var x = [['a', 'b', 'c'], [1, 2, -3]];
lists.has(x, 'd');
// false
lists.has(x, 'c');
// true