You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Return an array with only the unique values present in all given arrays using strict equality for comparisons.
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
4
5
5
Why another array `difference` lib? I wanted the [fastest, correct implementation](./benchmark) I could find.
6
6
7
-
## Install
8
7
## Install with [npm](npmjs.org)
9
8
10
9
```bash
@@ -16,37 +15,34 @@ npm i arr-diff --save
16
15
bower install arr-diff --save
17
16
```
18
17
19
-
## Run tests
20
-
21
-
```bash
22
-
npm test
23
-
```
24
-
25
18
## Usage
26
19
27
-
```js
28
-
var diff =require('arr-diff');
29
-
```
30
-
31
-
## API
32
-
### [diff](index.js#L33)
20
+
### [diff](index.js#L38)
33
21
34
-
Return the difference between two arrays.
22
+
Return the difference between the first array and additional arrays.
35
23
36
24
*`a`**{Array}**
37
25
*`b`**{Array}**
38
26
*`returns`: {Array}
39
27
40
28
```js
29
+
var diff =require('{%= name %}');
30
+
41
31
var a = ['a', 'b', 'c', 'd'];
42
32
var b = ['b', 'c'];
43
33
44
-
console.log(difference(a, b))
34
+
console.log(diff(a, b))
45
35
//=> ['a', 'd']
46
36
```
47
37
48
38
49
39
40
+
## Run tests
41
+
42
+
```bash
43
+
npm test
44
+
```
45
+
50
46
## Author
51
47
52
48
**Jon Schlinkert**
@@ -82,4 +78,4 @@ Released under the MIT license
82
78
83
79
***
84
80
85
-
_This file was generated by [verb](https://github.com/assemble/verb) on December 01, 2014._
81
+
_This file was generated by [verb](https://github.com/assemble/verb) on December 28, 2014._
0 commit comments