2.10.1 • Published 4 years ago
@extra-array/has-key.min v2.10.1
Checks if array has a key. :running: :package: :ledger:
Similar: value, values, hasValue, searchValue. Similar: hasValue, hasPrefix, hasInfix, hasSuffix, hasSubsequence, hasPermutation. This is part of package extra-array.
This is browserified, minified version of @extra-array/has-key. It is exported as global variable array_hasKey. CDN: unpkg, jsDelivr.
array.hasKey(x, [k]);
// x: an array
// k: key?
const array = require('extra-array');
var x = [10, 20, 30];
array.hasKey(x, 2);
// true
array.hasKey(x, 3);
// false
array.hasKey(x, -1);
// true
references
2.10.1
4 years ago