Socket
Socket
Sign inDemoInstall

array-includes-any

Package Overview
Dependencies
0
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    array-includes-any

JavaScript Check if array contains any of another array


Version published
Maintainers
1
Install size
50.7 kB
Created

Readme

Source

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

Keywords

FAQs

Last updated on 16 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc