1.0.2 • Published 2 years ago

fast-compare-two-arrays v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

welcome. you can use this package if you have two arrays of numbers or strings but the they must be the same type.

and you want to check if one of them contain the another one. or you want to check if they are intersect.

const a = 1,2,3,4,5;

const b = 2,3,4;

const c = 6;

console.log(isArrayContainArray(a, b)); //true

console.log(isArrayContainArray(a, c)); //false

const a = 1,2,3;

const b = 0,2,6;

const c = 4;

console.log(isArrayIntersectArray(a, b)); //true

console.log(isArrayIntersectArray(a, c)); //false