array-multi-find
v1.0.0
Published
Find multiple elements in an array
Downloads
89
Maintainers
Readme
array-multi-find
Find multiple elements in an array
Install
$ npm install --save array-multi-find
Usage
const multiFind = require('array-multi-find');
multiFind(['foo', 'bar'], ['baz']);
//=> []
multiFind(['foo', 'bar'], ['foo', 'baz']);
//=> ['foo']
multiFind(['foo', 'bar', 'baz'], ['foo', 'bar']);
//=> ['foo', 'bar']
API
multiFind(array, elements)
array
Type: Array
Array to search in.
elements
Type: Array
Elements to search in the array
.
License
MIT © Sam Verschueren