|
|
il y a 3 ans | |
|---|---|---|
| .. | ||
| .npmignore | il y a 3 ans | |
| LICENSE | il y a 3 ans | |
| README.md | il y a 3 ans | |
| index.js | il y a 3 ans | |
| package.json | il y a 3 ans | |
| test.js | il y a 3 ans | |
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