Miss any of our Open RFC calls?Watch the recordings here! »

array-includes-any

2.7.3 • Public • Published

array-includes-any

Travis Coverage Status Version license Donloads

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

Install

npm i array-includes-any

DownloadsWeekly Downloads

31

Version

2.7.3

License

MIT

Unpacked Size

51 kB

Total Files

17

Last publish

Collaborators

  • avatar