This repository has been archived on 2020-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
Syllabus/themes/piratecare/node_modules/indexes-of/README.md

25 lines
320 B
Markdown
Raw Permalink Normal View History

2020-03-05 04:10:52 +00:00
# indexes-of
like Array/String#indexOf but return all the indexes in an array.
``` js
var indexesOf = require('indexes-of')
var twosIndexes = indexesOf([1, 2, 3, 4, 5, 4, 3, 2, 1], 2)
console.log(twosIndexes)
// [1, 7]
```
# Haiku
* A 5 line module.
* But the tests are 40 lines.
* npm publish.
## License
MIT