Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
npm install arr-diff> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
Install with npm:
``sh`
$ npm install --save arr-diff
Install with yarn:
`sh`
$ yarn add arr-diff
Install with bower
`sh`
$ bower install arr-diff --save
Returns the difference between the first array and additional arrays.
`js
var diff = require('arr-diff');
var a = ['a', 'b', 'c', 'd'];
var b = ['b', 'c'];
console.log(diff(a, b))
//=> ['a', 'd']
`
This library versus array-differ, on April 14, 2017:
`
Benchmarking: (4 of 4)
· long-dupes
· long
· med
· short
fastest is arr-diff-4.0.0
fastest is arr-diff-4.0.0
fastest is arr-diff-4.0.0
fastest is arr-diff-4.0.0
`
* arr-flatten: Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | homepage
* array-filter: Array#filter for older browsers. | homepage
* array-intersection: Return an array with the unique values present in _all_ given arrays using strict equality… more | homepage
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
| Commits | Contributor |
| --- | --- |
| 33 | jonschlinkert |
| 2 | paulmillr |
_(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)_
To generate the readme, run the following command:
`sh`
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
`sh``
$ npm install && npm test
Jon Schlinkert
* github/jonschlinkert
* twitter/jonschlinkert
Copyright © 2017, Jon Schlinkert.
Released under the MIT License.
*
_This file was generated by verb-generate-readme, v0.5.0, on April 14, 2017._