Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

indexes-of

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

indexes-of

line String/Array#indexOf but return all the indexes in an array

    1.0.1latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
4,895,544
decreased by-4.14%

Weekly downloads

Readme

Source

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

FAQs

Last updated on 17 Nov 2013

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc