Initial commit
[yaffs-website] / node_modules / arr-diff / README.md
1 # arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg)](https://www.npmjs.com/package/arr-diff) [![Build Status](https://img.shields.io/travis/jonschlinkert/base.svg)](https://travis-ci.org/jonschlinkert/base)
2
3 > Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
4
5 ## Install
6
7 Install with [npm](https://www.npmjs.com/)
8
9 ```sh
10 $ npm i arr-diff --save
11 ```
12 Install with [bower](http://bower.io/)
13
14 ```sh
15 $ bower install arr-diff --save
16 ```
17
18 ## API
19
20 ### [diff](index.js#L33)
21
22 Return the difference between the first array and additional arrays.
23
24 **Params**
25
26 * `a` **{Array}**
27 * `b` **{Array}**
28 * `returns` **{Array}**
29
30 **Example**
31
32 ```js
33 var diff = require('arr-diff');
34
35 var a = ['a', 'b', 'c', 'd'];
36 var b = ['b', 'c'];
37
38 console.log(diff(a, b))
39 //=> ['a', 'd']
40 ```
41
42 ## Related projects
43
44 * [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten)
45 * [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter)
46 * [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://www.npmjs.com/package/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection)
47
48 ## Running tests
49
50 Install dev dependencies:
51
52 ```sh
53 $ npm i -d && npm test
54 ```
55
56 ## Contributing
57
58 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-diff/issues/new).
59
60 ## Author
61
62 **Jon Schlinkert**
63
64 + [github/jonschlinkert](https://github.com/jonschlinkert)
65 + [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
66
67 ## License
68
69 Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert)
70 Released under the MIT license.
71
72 ***
73
74 _This file was generated by [verb](https://github.com/verbose/verb) on Sat Dec 05 2015 23:24:53 GMT-0500 (EST)._