0.1.8 • Published 6 years ago

iterable-findallindices v0.1.8

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

iterable-findallindices

NOTE: iterable-findallindices was renamed to @extra-iterable/find-all-indices. NPM

Get indices of all values in iterable that satisfy the test, like Array.findIndex().

const findAllIndices = require('iterable-findallindices');
// findAllIndices(<iterable>, <test function>, [this], [begin=0], [end], [target=[]], [at])
// - <test function>(<value>, <index>, <iterable>)

findAllIndices(new Set(['a', 'b', 'cd']), (v) => v>'b');
// [2]
findAllIndices('abcd', (v, i, itr) => v>'b', null, 1);
// [2, 3]
findAllIndices('abcd', (v, i, itr) => v>'b', null, 1, 3);
// [2]
findAllIndices('abcd', (v, i, itr) => v>'b', null, 1, 3, [10, 11]);
// [10, 11, 2]
findAllIndices('abcd', (v, i, itr) => v>'b', null, 1, 3, [10, 11], 1);
// [10, 2]
0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago