Search results
1162 packages found
A one-liner to get a nested prop using dot-notation with a optional default value as fallback
Binary search -based indexOf for sorted arrays.
- binary
- search
- -based
- indexof
- sorted
- arrays
- arr
- array
- element
- find
- [compare]
- [comparenumeric=false]
- sort
- numerically
- View more
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
Binary search -based indexOf for sorted arrays.
- binary
- search
- -based
- indexof
- sorted
- arrays
- arr
- array
- element
- find
- [compare]
- [comparenumeric=false]
- sort
- numerically
- View more
Find all indexes at which an array element exists, by binary search.
- find
- indexes
- array
- element
- exists
- binary
- search
- [compare]
- [comparenumeric=false]
- sort
- numerically
- defaults
- lexicographic/alphabetic
- [comparedescending=false]
- 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
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
Make all the properties of an object enumerable. Optionally deep, shallow by default.
Return default value for object properties that does not exists i.e is undefined.
Simple solution to this problem: "TypeError: Cannot set property 'x' of undefined"
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
Simply check if a property inside a nested object is available, otherwise assign a default value.
Create a new object containing the same properties (through assignment) of another object along with an @@iterator method can make use of the default iteration behavior (such as for-of) that built-in iterables like Array or Map have.
Array.map for Object. Map both an object’s keys and values. Defaults to cleanly augment prototype.
Push that operates with Objects instead of arrays, used for joining objects including renaming duplicate keys (if the first parameter is true, default is false), by appending four underscores ( ____ ) and a number to the end of the key. Thereby making it
JavaScript library to merge custom object with default values
Wrap and validate optional values
Validates option parameters against a default option
Safely retrieve deeply nested values from an object.
Skema provides a handy & composable way to validate / transform / purify the input data.