array-differ / 2.0.3 last updated 2 months ago created on Jun 20th 2014

Install

npm install --save array-differ

Clone

git clone git@github.com:sindresorhus/array-differ.git

dependencies

No dependencies listed.

maintainers

sindresorhus sindresorhus

versions 6 total

2.0.3 2 months ago sindresorhus
2.0.2 2 months ago sindresorhus
2.0.1 2 months ago sindresorhus
2.0.0 2 months ago sindresorhus
1.0.0 2 years ago sindresorhus
0.1.0 2 years ago sindresorhus
35808 Downloads yesterday.

readme

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

1
2
3
4
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

Resolving all dependencies.. This could take a while as our cache is not yet fully warmed up.