projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
.gitignore added
[dotfiles/.git]
/
.config
/
coc
/
extensions
/
node_modules
/
coc-prettier
/
node_modules
/
indexes-of
/
README.md
1
# indexes-of
2
3
like Array/String#indexOf but return all the indexes in an array.
4
5
``` js
6
var indexesOf = require('indexes-of')
7
8
var twosIndexes = indexesOf([1, 2, 3, 4, 5, 4, 3, 2, 1], 2)
9
10
console.log(twosIndexes)
11
12
// [1, 7]
13
14
```
15
16
# Haiku
17
18
* A 5 line module.
19
* But the tests are 40 lines.
20
* npm publish.
21
22
## License
23
24
MIT