An open API service indexing awesome lists of open source software.

https://github.com/gitfaf/indices-for-same-value

Get all the indices for same value in an array.
https://github.com/gitfaf/indices-for-same-value

Last synced: 6 months ago
JSON representation

Get all the indices for same value in an array.

Awesome Lists containing this project

README

          

# Indices for same value

Get all the indices for a given value in an array.

```bash

npm i -S indices-for-same-value

```

```javascript

const getAllIndices = require('indices-for-same-value').getAllIndices

getAllIndices(10, [10, 2, 3, 4, 5, 6, 7, 10, 10 ,10])
// returns
// ["0", "7", "8", "9"]

```

## Testing

`jasmine`

## License

MIT © Git Faf 2017