0.1.2 • Published 6 years ago

array-indicesof v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

array-indicesof

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

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

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

indicesOf(['r', 'o', 'b', 'o'], 'o');
// [1, 3]
indicesOf(['r', 'o', 'b', 'o'], 'o', 1);
// [1, 3]
indicesOf(['r', 'o', 'b', 'o'], 'o', 1, 3);
// [1]
indicesOf(['r', 'o', 'b', 'o'], 'o', 1, 3, [10, 11]);
// [10, 11, 1]
indicesOf(['r', 'o', 'b', 'o'], 'o', 1, 3, [10, 11], 1);
// [10, 1]
0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

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