|
||||
---|---|---|---|---|
.. | ||||
.npmignore | 11e3a9652a | 7 年之前 | ||
LICENSE | 11e3a9652a | 7 年之前 | ||
README.md | 11e3a9652a | 7 年之前 | ||
index.js | 11e3a9652a | 7 年之前 | ||
package.json | 11e3a9652a | 7 年之前 | ||
test.js | 11e3a9652a | 7 年之前 |
like Array/String#indexOf but return all the indexes in an array.
var indexesOf = require('indexes-of')
var twosIndexes = indexesOf([1, 2, 3, 4, 5, 4, 3, 2, 1], 2)
console.log(twosIndexes)
// [1, 7]
MIT