array-includes-any
v2.7.3
Published
JavaScript Check if array contains any of another array
Downloads
33
Maintainers
Readme
array-includes-any
JavaScript Check if array contains any of another array
Install
npm install --save array-includes-any
Examples
//CommonJS
var array_includes_any = require("array-includes-any").array_includes_any;
//ES6
import array_includes_any from "array-includes-any";
array_includes_any([1, 2], [1, 2]); //true
array_includes_any([1, 2], [1]); //true
array_includes_any([1, 2], [1], "equal"); //false
array_includes_any([1, 2], [1, 2], "equal"); //true
array_includes_any([1, 2], [2, 1], "equal"); //false
array_includes_any([], [2, 1]); //false
array_includes_any([1, 2, 2], [1, 2], "equal"); //false
array_includes_any([1, 2, 2], [1, 2, 2], "equal"); //true
array_includes_any([1, 2, 2], [1, 2, 2]); //true
WebAssembly
The folder wasm demonstrates how to compile the original function to WebAssembly.
License
MIT