js-array-utils
v1.0.10
Published
A simple module contains different array helper functions.
Downloads
14
Maintainers
Readme
A simple module contains different array helper functions.
Installation
npm install js-array-utils --save
Usage example
const {findCommonElements} = require("js-array-utils");
let a = [1, 2, 3, 1, 4, 1];
let b = [1, 5,9, 0, 10];
let commonElements = findCommonElements(a, b);
console.log(commonElements)
.
.
Available methods and description
| Method | No. of Parameters | Description | | ----------------------|---------------------| ----------------| | findCommonElements() | 2| To find common elements from 2 arrays| | removeDuplicates() | 1| Returns array by removing duplicate elements|