Functions
1. Arrays
- chunk
: Chunks an array into smaller arrays of a specified size.
- compact
: Removes falsy values from an array, If strict is true, also removes empty objects and arrays.
- insert
: Inserts elements into an array at a specified index.
- partition
: Partitions an array into two arrays based on a given callback ie predicate.
- remove
: Removes elements from an array at a specified index.
- rotate
: Rotates the elements of an array by a given number of positions.
- sampleArr
: Generates an array of random numbers.
- search
: Search objects in an array based on provided keys and query string. It only works with string and number values.
- shuffleArr
: Shuffles the elements of an array.
- unique
: Creates a unique array from the input array.
- zip
: Zips arrays together in the form of an array of arrays.
2. Functional
- retry
: Retries the given function a specified number of times with a delay between each retry.
- sleep
: Sleeps the execution for the specified number of milliseconds.
- timeout
: The timeout function wraps a function with a timeout. If the function does not complete within the specified time, the promise will be rejected.
3. Gates
4. Objects
- mapObj
: Same as Array.prototype.map, but for objects.