1.0.10 • Published 3 years ago
js-array-utils v1.0.10
A simple module contains different array helper functions.
Installation
npm install js-array-utils --saveUsage 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 |