is-a-subset

0.0.2 • Public • Published

isSubset

Determine if arr1 is a subset of arr2

Usage

// npm install is-a-subset --save

// *.js
const isSubset = require('is-a-subset').default;

console.log(isSubset([1,2],[2,1])) // => true
isSubset([{id:1},{id:2}],[{id:2},{id:1}],(a,b)=>a.id===b.id) // => true

Readme

Keywords

Package Sidebar

Install

npm i is-a-subset

Weekly Downloads

7

Version

0.0.2

License

MIT

Unpacked Size

4.48 kB

Total Files

5

Last publish

Collaborators

  • changlin