Search results
225 packages found
Filter an array and produce a human-readable result as a string
Convert arrays into objects by using unique fields.
Map object keys and values into an array
Shallow clone of provided array, 'arr'.
Linear-time Partitioning. Runtime: O(n). Chooses a pivot and re-arrages the array so that everything on the left is <= pivot and everything on the right is > pivot
Sort an array considerably faster than the native Array.prototype.sort as a drop-in replacement. Fork of of the famous timsort module, but this module allows for passing comparator-builder options instead of a comparator function. In short, advanced compa
- sort
- array
- considerably
- faster
- native
- arrayprototypesort
- drop-in
- replacement
- fork
- famous
- timsort
- module
- passing
- comparator-builder
- View more
For a sorted array, add an element. Whichever comparator function was used to sort the array, can be passed. Also supports comparator-builder options. For reference, see: https://github.com/bemoje/bemoje-arr-sort-comparator
- sorted
- array
- add
- element
- whichever
- comparator
- function
- sort
- passed
- supports
- comparator-builder
- options
- reference
- https://github.com/bemoje/bemoje-arr-sort-comparator
- View more
Remove all duplicate elements in a sorted array, leaving only uniques.
- remove
- duplicate
- elements
- sorted
- array
- leaving
- uniques
- arr
- [compare]
- [comparenumeric=false]
- sort
- numerically
- defaults
- lexicographic/alphabetic
- View more
Array#includes with support for regex
Find the array index of where to add an element to keep it sorted.
- find
- array
- index
- add
- element
- sorted
- arr
- insertion
- [compare]
- [comparenumeric=false]
- sort
- numerically
- defaults
- lexicographic/alphabetic
- View more
Flattens the passed array recursively.
Binary search -based indexOf for sorted arrays.
- binary
- search
- -based
- indexof
- sorted
- arrays
- arr
- array
- element
- find
- [compare]
- [comparenumeric=false]
- sort
- numerically
- View more
Remove an element in place from an array, if present.
Create an array or array-like without duplicates
We are lazy, also [lazy-cache][]d and [browserify][]-ready - just arrayify, falsey values returns empty array. In bonus with `.isArray` method.
The fastest sorting algorithm ever with the speed of O(1)
A tiny, faster alternative to native Array.prototype.reduce
A tiny, faster alternative to native Array.prototype.forEach
A tiny, faster alternative to native Array.prototype.find
A tiny, faster alternative to native Array.prototype.filter