array-diff

v2.1.2arrow_drop_down
v2.1.2
v2.1.1
v2.1.0
v2.0.9
v2.0.8
v2.0.6
v2.0.5
v2.0.1
v1.1.1
v1.1.0
v1.0.8
STATUS
Passing
DOWNLOADS
1,457
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
560 B
return diff of two array
1 contributor
Install array-diff as a package?
Copied
npm i @bit/joshk.jotils.array-diff
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
No preview available
modifieddraft
No preview available
modifieddraft
chevron_left
chevron_right
arrayDiff (
a1:Array,
a2:Array
) : Array

return diff of two array

Examples
import arrayDiff from '@bit/joshk.jotils.array-diff'
export default arrayDiff(['a', 'b'], ['a', 'b', 'c', 'd']) // => ['c', 'd']
import arrayDiff from '@bit/joshk.jotils.array-diff'
export default arrayDiff("abcd", "abcde") // => ['e']
import arrayDiff from '@bit/joshk.jotils.array-diff'
export default arrayDiff("zxc", "zxc") // => []
Arguments
a1: Array

array

a2: Array

array

Returns
Array

diff array

Test Summary

arrayDiff check with two array

Pass

arrayDiff check with two string

Pass

arrayDiff check with two equal string

Pass
Help and resources