0.1.7 • Published 6 years ago

iterable-indicesof v0.1.7

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

iterable-indicesof

NOTE: iterable-indicesof was renamed to @extra-iterable/indices-of. NPM

Get indices of all values in iterable equal to specified value, like Array.indexOf().

const indicesOf = require('iterable-indicesof');
// indicesOf(<iterable>, <search value>, [begin=0], [end], [target=[]], [at])

indicesOf(new Set(['a', 'b', 'c']), 'c');
// [2]
indicesOf('cccc', 'c', 1);
// [1, 2, 3]
indicesOf('cccc', 'c', 1, 3);
// [1, 2]
indicesOf('cccc', 'c', 1, 3, [10, 11]);
// [10, 11, 1, 2]
indicesOf('cccc', 'c', 1, 3, [10, 11], 1);
// [10, 1, 2]
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.8

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