Skip to content

gluthra/arrays-difference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arrays-difference

Returns an array containing those elements which are present in first array and not in others

Installation

$ npm install arrays-difference

Usage

var arrDiff = require('arrays-difference');

arrDiff([1, 2], [2, 3, 4]);
//=> [1]

arrDiff([21, 27, 29, 31], [13, 4], [41, 27, 30], [21]);
//=> [29, 31]


arrDiff(['hello', 'world'], ['this', 'is', 'my', 'world']);
//=> ['hello']

License

MIT © Gaurav Luthra

About

Returns the elements that are present in first array but not in additional arrays

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published