indices-for-same-value
v5.0.0
Published
Get the indices in an array where value is equal to the given one.
Downloads
2
Readme
Indices for same value
Get all the indices for a given value in an array.
npm i -S indices-for-same-value
const getAllIndices = require('indices-for-same-value').getAllIndices
getAllIndices(10, [10, 2, 3, 4, 5, 6, 7, 10, 10 ,10])
// returns
// ["0", "7", "8", "9"]
Testing
jasmine
License
MIT © Git Faf 2017