Syllabus/themes/sandpoints/node_modules/indexes-of
Marcell Mars fd78b9e4e3 initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
..
.npmignore initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
LICENSE initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
README.md initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
index.js initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
package.json initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
test.js initial sandpoints theme commit.. 2020-08-19 01:14:35 +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