nodejs_array_utils
v1.0.2
Published
Custom array utility functions for JavaScript
Maintainers
Readme
Array Functions Package
A collection of useful Higher Order Functions (HOF) for arrays in JavaScript.
Installation
npm i nodejs_array_utils
# Available Functions
removeDuplicates: Removes duplicate elements from an array.
sumEvenNumbers: Calculates the sum of even numbers in an array.
average: Calculates the average of all numbers in an array.
reverseStringArray: Reverses the order of characters in each string of an array.
groupByLength: Groups array elements by their string length.
removeFalsy: Removes falsy values (false, null, 0, "", undefined, and NaN) from an array.
multiplyByIndex: Multiplies each element of the array by its index.
partition: Partitions the array into two arrays based on a given condition.
uniqueUnion: Creates a new array that is the union of two arrays with unique elements.
rotateLeft: Rotates the elements of an array to the left by a specified number of positions.