grand-array
Easy to use Array Manipulator with tons of Array Operations
github: https://github.com/jaipack17/grand-array
Update: .countOfPairs() added
Installation
Use the package manager npm to install grand-array
$ npm i grand-array
OR
$ npm install grand-array
Require
const GrandArray = require("grand-array")
Functions
Searching
GrandArray.find(array,value)
GrandArray.findMany(array,value1,value2,valueN)
Merging and Connecting
GrandArray.connect(array1,array2)
GrandArray.merge(array1,array2)
GrandArray.clone(array)
Removing and Adding
GrandArray.destroyBefore(array,index)
GrandArray.destroyAfter(array,index)
GrandArray.add(array, value)
GrandArray.addMany(array, value1, value2, valueN)
GrandArray.remove(array, index)
GrandArray.removeMany(array, index1, index2, indexN)
GrandArray.bombArray(array)
JSON Objects
GrandArray.toJSON(array)
Rearranging
GrandArray.sortAscending(array)
GrandArray.sortDescending(array)
GrandArray.reverse(array)
Mathematical Operations
GrandArray.min(array)
GrandArray.max(array)
GrandArray.sum(array)
GrandArray.sumArrays(array1,array2)
Count
GrandArray.countOfOdd(array)
GrandArray.countOfEven(array)
GrandArray.countOfPositive(array)
GrandArray.countOfNegative(array)
GrandArray.countOfZero(array)
GrandArray.countOfPrime(array)
GrandArray.countOfPairs(array)
New functions will be added and the package will be updated frequently