Share your code. Components are building blocks, you are the architect.

array/diff
v1.0.0
1.0.0
0.0.1
bit
Contributors
Gravatar for undefinedGravatar for undefined
1
MIT
PUBLIC
22
0     DEPENDENCIES
Build: pass
BuildPass
Build Status: pass

Computes the difference between two array references.

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use array/diff in your project
npm i @bit/bit.utils.array.diff
Copied

diff (firstArray:[], secondArray:[]) : []

Computes the difference between two array references.

Example

diff([1,2,3], [1,2,3,4,5]) // => [4,5]

Arguments

firstArray: []

secondArray: []

Returns

[]

returns an array representing the difference between the two arrays

Test Summary


#array/diff() should return an empty array as both arrays are equalPass
#array/diff() should return the difference between the two arrays (1, 5, 6)Pass