keksAccountGUI/node_modulesOLD/indexes-of
Kekskurse 8e5ce9e324 Update Framework 2019-08-11 20:48:02 +02:00
..
.npmignore Update Framework 2019-08-11 20:48:02 +02:00
LICENSE Update Framework 2019-08-11 20:48:02 +02:00
README.md Update Framework 2019-08-11 20:48:02 +02:00
index.js Update Framework 2019-08-11 20:48:02 +02:00
package.json Update Framework 2019-08-11 20:48:02 +02:00
test.js Update Framework 2019-08-11 20:48:02 +02:00

README.md

indexes-of

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]

Haiku

  • A 5 line module.
  • But the tests are 40 lines.
  • npm publish.

License

MIT