2.1.6 • Published 5 years ago
@extra-lists/is-entry v2.1.6
Checks if map has an entry. :running: :package: :ledger:
Similar: entry, isEntry. This is part of package extra-lists.
lists.isEntry(x, e, [fc], [fm]);
// x: a map
// e: entry?
// fc: compare function (a, b)
// fm: map function (v, k, x)
const lists = require('extra-lists');
var x = [['a', 'b', 'c'], [1, 2, -3]];
lists.isEntry(x, ['c', 3]);
// false
lists.isEntry(x, ['c', 3], (a, b) => Math.abs(a) - Math.abs(b));
// true
lists.isEntry(x, ['c', 3], null, v => Math.abs(v));
// true