0.1.3 • Published 6 years ago
entries-findallindices v0.1.3
entries-findallindices
Get indices of all values in entries that satisfy the test, like Array.findIndex().
DEPRECATED: Please use entries-findallkeys instead.
const findAllIndices = require('entries-findallindices');
// findAllIndices(<entries>, <test function>, [this])
findAllIndices([3, 1, 4, 1, 5, 9, 2, 6, 5].entries(), (v) => v>6);
// [5]
findAllIndices(new Set([1, 6, 1, 6, 2, 2, 9]).entries(), (v, i) => v>5);
// [6, 9]
findAllIndices(Object.entries({l: 1.616e-35, m: 2.176e-8}), (v, i, ent) => v===5.391e-44);
// []