githubEdit

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

Install with npmarrow-up-right:

$ npm install --save arr-diff

Install with yarnarrow-up-right:

$ yarn add arr-diff

Install with bowerarrow-up-right

$ bower install arr-diff --save

Usage

Returns the difference between the first array and additional arrays.

var diff = require('arr-diff');

var a = ['a', 'b', 'c', 'd'];
var b = ['b', 'c'];

console.log(diff(a, b))
//=> ['a', 'd']

Benchmarks

This library versus array-differarrow-up-right, on April 14, 2017:

About

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issuearrow-up-right.

Contributors

Building docs

(This project's readme.md is generated by verbarrow-up-right, please don't edit the readme directly. Any changes to the readme must be made in the .verb.mdarrow-up-right readme template.)

To generate the readme, run the following command:

Running tests

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:

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkertarrow-up-right. Released under the MIT Licensearrow-up-right.


This file was generated by verb-generate-readmearrow-up-right, v0.5.0, on April 14, 2017.

Last updated

Was this helpful?