Skip to content
Subhajit Sahu edited this page Dec 28, 2022 · 10 revisions

Check if ilists has a key.

Alternatives: has, hasValue, hasEntry, hasSubset, hasPath.
Similar: randomKey, keys, has.


function has(x, k)
// x: ilists
// k: search key
const xilists = require('extra-ilists');

var x = [['a', 'b', 'c'], [1, 2, -3]];
xilists.has(x, 'd');
// → false

xilists.has(x, 'c');
// → true


References

Clone this wiki locally