npm

npm’s 2019 JavaScript ecosystem survey analysis is now available! Get your copy here »

array-differ

3.0.0 • Public • Published

array-differ Build Status

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

Install

$ npm install array-differ

Usage

const arrayDiffer = require('array-differ');
 
arrayDiffer([2, 3, 4], [3, 50]);
//=> [2, 4]

API

arrayDiffer(input, ...values)

Returns a new array.

input

Type: unknown[]

values

Type: unknown[]

Arrays of values to exclude.

License

MIT © Sindre Sorhus

install

npm i array-differ

Downloadsweekly downloads

1,973,992

version

3.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability