Create an array with values that are present in the first input array but not additional ones
JavaScript
Latest commit 3dd2ebb Apr 27, 2016 @sindresorhus 2.0.3
Permalink
Failed to load latest commit information.
.editorconfig meta tweaks Apr 27, 2016
.gitattributes init Jun 20, 2014
.gitignore init Jun 20, 2014
.travis.yml es2015ify (#4) Apr 27, 2016
index.js es2015ify (#4) Apr 27, 2016
license init Jun 20, 2014
package.json 2.0.3 Apr 27, 2016
readme.md meta tweaks Apr 27, 2016
test.js es2015ify (#4) Apr 27, 2016

readme.md

array-differ Build Status

Create an array with values that are present in the first input array but not additional ones

Install

$ npm install --save array-differ

Usage

const arrayDiffer = require('array-differ');

arrayDiffer([2, 3, 4], [3, 50]);
//=> [2, 4]

API

arrayDiffer(input, values, [values, ...])

Returns a new array.

input

Type: array

values

Type: array

Arrays of values to exclude.

License

MIT © Sindre Sorhus