Skip to content
Subhajit Sahu edited this page Dec 22, 2022 · 9 revisions

Check if ientries has a key.

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


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

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

ientries.has(x, "c");
// → true


References

Clone this wiki locally