Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skycloud1030/array-includes-any
JavaScript Check if array contains any of another array
https://github.com/skycloud1030/array-includes-any
includes javascript webassembly
Last synced: 11 days ago
JSON representation
JavaScript Check if array contains any of another array
- Host: GitHub
- URL: https://github.com/skycloud1030/array-includes-any
- Owner: skycloud1030
- License: mit
- Created: 2017-05-26T07:10:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T03:32:05.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T23:59:17.593Z (7 months ago)
- Topics: includes, javascript, webassembly
- Language: JavaScript
- Homepage:
- Size: 2.51 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# array-includes-any
[![Travis](https://api.travis-ci.org/skycloud1030/array-includes-any.svg?branch=master)](https://travis-ci.org/skycloud1030/array-includes-any)
[![Coverage Status](https://coveralls.io/repos/github/skycloud1030/array-includes-any/badge.svg?branch=master)](https://coveralls.io/github/skycloud1030/array-includes-any?branch=master)
[![Version](https://img.shields.io/npm/v/array-includes-any.svg)](https://www.npmjs.com/package/array-includes-any)
[![license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/skycloud1030/array-includes-any/blob/master/LICENSE)
[![Donloads](https://img.shields.io/npm/dm/array-includes-any.svg)](https://www.npmjs.com/package/array-includes-any)JavaScript Check if array contains any of another array
## Install
```sh
npm install --save array-includes-any
```## Examples
```js
//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](https://github.com/skycloud1030/array-includes-any/tree/master/wasm) demonstrates how to compile the original function to WebAssembly.
## License
```sh
MIT
```