Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/bjarneo/array-find

Finding all the occurrences of an element in an array
https://github.com/bjarneo/array-find

Last synced: 3 days ago
JSON representation

Finding all the occurrences of an element in an array

Awesome Lists containing this project

README

        

# a-find
![Travis](https://travis-ci.org/bjarneo/array-find.svg?branch=master)

Finding all the occurrences of an element in an array

###Install
```Javascript
npm install --save a-find
```

###Usage
```Javascript
var find = require('a-find');

find(['a', 'b', 'c', 'd', 'c'], 'c') // => [2, 4]

find(['a', 'b', 'c', 'd', 'c'], 'b') // => [1]
```