Skip to main content
This release is 5 versions behind 1.31.0 — the latest version of @es-toolkit/es-toolkit. Jump to latest

Built and signed on GitHub Actions

A modern JavaScript utility library that's 2-3 times faster and up to 97% smaller—a major upgrade to lodash.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
2 months ago (1.27.0)

default

es-toolkit

c
AbortError

An error class representing an aborted operation.

f
after

Creates a function that only executes starting from the n-th call. The provided function will be invoked starting from the n-th call.

f
ary

Creates a function that invokes func, with up to n arguments, ignoring any additional arguments.

f
at

Retrieves elements from an array at the specified indices.

f
before

Creates a function that limits the number of times the given function (func) can be called.

f
camelCase

Converts a string to camel case.

f
capitalize

Converts the first character of string to upper case and the remaining to lower case.

f
chunk

Splits an array into smaller arrays of a specified length.

f
clamp

Clamps a number within the inclusive upper bound.

f
clone

Creates a shallow clone of the given object.

f
cloneDeep

Creates a deep clone of the given object.

f
compact

Removes falsey values (false, null, 0, 0n, '', undefined, NaN) from an array.

f
constantCase

Converts a string to constant case.

f
countBy

Count the occurrences of each item in an array based on a transformation function.

f
curry

Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument. This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.

f
curryRight

Curries a function, allowing it to be called with a single argument at a time and returning a new function that takes the next argument. This process continues until all arguments have been provided, at which point the original function is called with all accumulated arguments.

f
debounce

Creates a debounced function that delays invoking the provided function until after debounceMs milliseconds have elapsed since the last time the debounced function was invoked. The debounced function also has a cancel method to cancel any pending execution.

f
deburr

Converts a string by replacing special characters and diacritical marks with their ASCII equivalents. For example, "Crème brûlée" becomes "Creme brulee".

f
delay

Delays the execution of code for a specified number of milliseconds.

f
difference

Computes the difference between two arrays.

f
differenceBy

Computes the difference between two arrays after mapping their elements through a provided function.

f
differenceWith

Computes the difference between two arrays based on a custom equality function.

f
drop

Removes a specified number of elements from the beginning of an array and returns the rest.

f
dropRight

Removes a specified number of elements from the end of an array and returns the rest.

f
dropRightWhile

Removes elements from the end of an array until the predicate returns false.

f
dropWhile

Removes elements from the beginning of an array until the predicate returns false.

f
escape

Converts the characters "&", "<", ">", '"', and "'" in str to their corresponding HTML entities. For example, "<" becomes "<".

f
escapeRegExp

Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in str.

f
fill

Fills the whole array with a specified value.

f
findKey

Finds the key of the first element in the object that satisfies the provided testing function.

f
flatMap

Maps each element in the array using the iteratee function and flattens the result up to the specified depth.

f
flatMapDeep

Recursively maps each element in an array using a provided iteratee function and then deeply flattens the resulting array.

f
flatten

Flattens an array up to the specified depth.

f
flattenDeep

Flattens all depths of a nested array.

f
flattenObject

Flattens a nested object into a single level object with dot-separated keys.

f
flow

Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.

f
flowRight

Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.

f
forEachRight

Iterates over elements of 'arr' from right to left and invokes 'callback' for each element.

f
groupBy

Groups the elements of an array based on a provided key-generating function.

f
head

Returns the first element of an array.

f
identity

Returns the input value unchanged.

f
initial

Returns an empty array when the input is a tuple containing exactly one element.

f
inRange

Checks if the value is less than the maximum.

f
intersection

Returns the intersection of two arrays.

f
intersectionBy

Returns the intersection of two arrays based on a mapping function.

f
intersectionWith

Returns the intersection of two arrays based on a custom equality function.

f
invariant

Asserts that a given condition is true. If the condition is false, an error is thrown with the provided message.

f
invert

Inverts the keys and values of an object. The keys of the input object become the values of the output object and vice versa.

f
isArrayBuffer

Checks if a given value is ArrayBuffer.

f
isBlob

Checks if the given value is a Blob.

f
isBoolean

Checks if the given value is boolean.

f
isDate

Checks if value is a Date object.

f
isEqual

Checks if two values are equal, including support for Date, RegExp, and deep object comparison.

f
isEqualWith

Compares two values for equality using a custom comparison function.

f
isError

Checks if value is an Error object.

f
isFile

Checks if the given value is a File.

f
isFunction

Checks if value is a function.

f
isJSONArray

Checks if a given value is a valid JSON array.

f
isJSONObject

Checks if a value is a JSON object.

f
isJSONValue

Checks if a given value is a valid JSON value.

f
isLength

Checks if a given value is a valid length.

f
isMap

Checks if a given value is Map.

f
isNil

Checks if a given value is null or undefined.

f
isNotNil

Checks if the given value is not null nor undefined.

f
isNull

Checks if the given value is null.

f
isPlainObject

Checks if a given value is a plain object.

f
isPrimitive

Checks whether a value is a JavaScript primitive. JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.

f
isRegExp

Checks if value is a RegExp.

f
isSet

Checks if a given value is Set.

f
isString

Checks if a given value is string.

f
isSubset

Checks if the subset array is entirely contained within the superset array.

f
isSubsetWith

Checks if the subset array is entirely contained within the superset array based on a custom equality function.

f
isSymbol

Check whether a value is a symbol.

f
isTypedArray

Checks if a value is a TypedArray.

f
isUndefined

Checks if the given value is undefined.

f
isWeakMap

Checks if the given value is a WeakMap.

f
isWeakSet

Checks if the given value is a WeakSet.

f
kebabCase

Converts a string to kebab case.

f
keyBy

Maps each element of an array based on a provided key-generating function.

f
last

Returns the last element of an array.

f
lowerCase

Converts a string to lower case.

f
lowerFirst

Converts the first character of string to lower case.

f
mapKeys

Creates a new object with the same values as the given object, but with keys generated by running each own enumerable property of the object through the iteratee function.

f
mapValues

Creates a new object with the same keys as the given object, but with values generated by running each own enumerable property of the object through the iteratee function.

f
maxBy

Finds the element in an array that has the maximum value when applying the getValue function to each element.

f
mean

Calculates the average of an array of numbers.

f
meanBy

Calculates the average of an array of numbers when applying the getValue function to each element.

f
median

Calculates the median of an array of numbers.

f
medianBy

Calculates the median of an array of elements when applying the getValue function to each element.

f
memoize

Creates a memoized version of the provided function. The memoized function caches results based on the argument it receives, so if the same argument is passed again, it returns the cached result instead of recomputing it.

I
MemoizeCache

Represents a cache for memoization, allowing storage and retrieval of computed values.

f
merge

Merges the properties of the source object into the target object.

f
mergeWith

Merges the properties of the source object into the target object.

f
minBy

Finds the element in an array that has the minimum value when applying the getValue function to each element.

f
negate

Creates a function that negates the result of the predicate function.

f
noop

A no-operation function that does nothing. This can be used as a placeholder or default function.

f
omit

Creates a new object with specified keys omitted.

f
omitBy

Creates a new object composed of the properties that do not satisfy the predicate function.

f
once

Creates a function that is restricted to invoking the provided function func once. Repeated calls to the function will return the value from the first invocation.

f
orderBy

Sorts an array of objects based on the given criteria and their corresponding order directions.

f
pad

Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length. If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged.

f
N
partial

Creates a function that invokes func with partialArgs prepended to the arguments it receives. This method is like bind except it does not alter the this binding.

v
partial.placeholder
No documentation available
f
N
partialRight

This method is like partial except that partially applied arguments are appended to the arguments it receives.

v
partialRight.placeholder
No documentation available
f
partition

Splits an array into two groups based on a predicate function.

f
pascalCase

Converts a string to Pascal case.

f
pick

Creates a new object composed of the picked object properties.

f
pickBy

Creates a new object composed of the properties that satisfy the predicate function.

f
pullAt

Removes elements from an array at specified indices and returns the removed elements.

f
random

Generate a random number within the given range.

f
randomInt

Generates a random integer between 0 (inclusive) and the given maximum (exclusive).

f
range

Returns an array of numbers from 0 (inclusive) to end (exclusive), incrementing by 1.

f
rangeRight

Returns an array of numbers from end (exclusive) to 0 (inclusive), decrementing by 1.

f
rest

Creates a function that transforms the arguments of the provided function func. The transformed arguments are passed to func such that the arguments starting from a specified index are grouped into an array, while the previous arguments are passed as individual elements.

f
round

Rounds a number to a specified precision.

f
sample

Returns a random element from an array.

f
sampleSize

Returns a sample element array of a specified size.

f
shuffle

Randomizes the order of elements in an array using the Fisher-Yates algorithm.

f
snakeCase

Converts a string to snake case.

f
sortBy

Sorts an array of objects based on the given criteria.

f
spread

Creates a new function that spreads elements of an array argument into individual arguments for the original function.

f
startCase

Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.

f
sum

Calculates the sum of an array of numbers.

f
sumBy

Calculates the sum of an array of numbers when applying the getValue function to each element.

f
tail

Returns an empty array when the input is a single-element array.

f
take

Returns a new array containing the first count elements from the input array arr. If count is greater than the length of arr, the entire array is returned.

f
takeRight

Returns a new array containing the last count elements from the input array arr. If count is greater than the length of arr, the entire array is returned.

f
takeRightWhile

Takes elements from the end of the array while the predicate function returns true.

f
takeWhile

Returns a new array containing the leading elements of the provided array that satisfy the provided predicate function. It stops taking elements as soon as an element does not satisfy the predicate.

f
throttle

Creates a throttled function that only invokes the provided function at most once per every throttleMs milliseconds. Subsequent calls to the throttled function within the wait time will not trigger the execution of the original function.

f
timeout

Returns a promise that rejects with a TimeoutError after a specified delay.

c
TimeoutError

An error class representing an timeout operation.

f
toFilled

Creates a new array filled with the specified value from the start position up to, but not including, the end position. This function does not mutate the original array.

f
toMerged

Merges the properties of the source object into a deep clone of the target object. Unlike merge, This function does not modify the original target object.

f
trim

Removes leading and trailing whitespace or specified characters from a string.

f
trimEnd

Removes trailing whitespace or specified characters from a string.

f
trimStart

Removes leading whitespace or specified characters from a string.

f
unary

Creates a function that accepts up to one argument, ignoring any additional arguments.

f
unescape

Converts the HTML entities &amp;, &lt;, &gt;, &quot;, and &#39; in str to their corresponding characters. It is the inverse of escape.

f
union

Creates an array of unique values from all given arrays.

f
unionBy

Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality.

f
unionWith

Creates an array of unique values from two given arrays based on a custom equality function.

f
uniq

Creates a duplicate-free version of an array.

f
uniqBy

Returns a new array containing only the unique elements from the original array, based on the values returned by the mapper function.

f
uniqWith

Returns a new array containing only the unique elements from the original array, based on the values returned by the comparator function.

f
unzip

Gathers elements in the same position in an internal array from a grouped array of elements and returns them as a new array.

f
unzipWith

Unzips an array of arrays, applying an iteratee function to regrouped elements.

f
upperCase

Converts a string to upper case.

f
upperFirst

Converts the first character of string to upper case.

f
without

Creates an array that excludes all specified values.

f
withTimeout

Executes an async function and enforces a timeout.

f
words

Splits string into an array of its words, treating spaces and punctuation marks as separators.

f
xor

Computes the symmetric difference between two arrays. The symmetric difference is the set of elements which are in either of the arrays, but not in their intersection.

f
xorBy

Computes the symmetric difference between two arrays using a custom mapping function. The symmetric difference is the set of elements which are in either of the arrays, but not in their intersection, determined by the result of the mapping function.

f
xorWith

Computes the symmetric difference between two arrays using a custom equality function. The symmetric difference is the set of elements which are in either of the arrays, but not in their intersection.

f
zip

Combines multiple arrays into a single array of tuples.

f
zipObject

Combines two arrays, one of property names and one of corresponding values, into a single object.

f
zipWith

Combines multiple arrays into a single array using a custom combiner function.

compat

es-toolkit compatibility layer with lodash (WIP)

c
AbortError

An error class representing an aborted operation.

f
after

Creates a function that only executes starting from the n-th call. The provided function will be invoked starting from the n-th call.

f
ary

Creates a function that invokes func, with up to n arguments, ignoring any additional arguments.

f
at

Retrieves elements from an array at the specified indices.

f
attempt

Attempts to execute a function with the provided arguments. If the function throws an error, it catches the error and returns it. If the caught error is not an instance of Error, it wraps it in a new Error.

f
before

Creates a function that invokes func, with the this binding and arguments of the created function, while it's called less than n times. Subsequent calls to the created function return the result of the last func invocation.

f
N
bind

Creates a function that invokes func with the this binding of thisArg and partials prepended to the arguments it receives.

v
bind.placeholder
No documentation available
f
N
bindKey

Creates a function that invokes the method at object[key] with partialArgs prepended to the arguments it receives.

v
bindKey.placeholder
No documentation available
f
camelCase

Converts a string to camel case.

f
capitalize

Converts the first character of string to upper case and the remaining to lower case.

f
castArray

Casts value as an array if it's not one.

f
ceil

Computes number rounded up to precision.

f
chunk

Splits an array into smaller arrays of a specified length.

f
clamp

Clamps a number within the inclusive upper bound.

f
clone

Creates a shallow clone of the given object.

f
cloneDeep

Creates a deep clone of the given object.

f
compact

Removes falsey values (false, null, 0, 0n, '', undefined, NaN) from an array.

f
concat

Concatenates multiple arrays and values into a single array.

f
conforms

Creates a function that invokes the predicate properties of source with the corresponding property values of a given object, returning true if all predicates return truthy, else false.

f
conformsTo

Checks if object conforms to source by invoking the predicate properties of source with the corresponding property values of object.

f
constant

Creates a new function that always returns undefined.

f
constantCase

Converts a string to constant case.

f
countBy

Count the occurrences of each item in an array based on a transformation function.

f
N
curry

Creates a function that accepts arguments of func and either invokes func returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.

v
curry.placeholder
No documentation available
f
N
curryRight

Creates a function that accepts arguments of func and either invokes func returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.

v
curryRight.placeholder
No documentation available
f
debounce

Creates a debounced function that delays invoking the provided function until after debounceMs milliseconds have elapsed since the last time the debounced function was invoked. The debounced function also has a cancel method to cancel any pending execution.

f
deburr

Converts a string by replacing special characters and diacritical marks with their ASCII equivalents. For example, "Crème brûlée" becomes "Creme brulee".

f
defaults

Assigns default values to an object, ensuring that certain properties do not remain undefined. It sets default values for properties that are either undefined or inherited from Object.prototype.

f
defaultTo

Returns the default value for null, undefined, and NaN.

f
defer

Defers invoking the func until the current call stack has cleared. Any additional arguments are provided to func when it's invoked.

f
delay

Delays the execution of code for a specified number of milliseconds.

f
difference

Computes the difference between an array and multiple arrays.

f
differenceBy

Computes the difference between an array and another array using an iteratee function.

f
differenceWith

Computes the difference between two arrays based on a custom equality function.

f
drop

Removes a specified number of elements from the beginning of an array and returns the rest.

f
dropRight

Removes a specified number of elements from the end of an array and returns the rest.

f
dropRightWhile

Drops elements from the end of an array while the predicate function returns truthy.

f
dropWhile

Drops elements from the beginning of an array while the predicate function returns truthy.

f
each

Iterates over each element of the array invoking the provided callback function for each element.

f
endsWith

Checks if a string contains another string at the end of the string.

f
eq

Performs a SameValueZero comparison between two values to determine if they are equivalent.

f
escape

Converts the characters "&", "<", ">", '"', and "'" in str to their corresponding HTML entities. For example, "<" becomes "<".

f
escapeRegExp

Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in str.

f
every

Checks if all elements in an array are truthy.

f
fill

Fills the whole array with a specified value.

f
filter

Filters items from a array and returns an array of elements.

f
find

Finds the first item in an array that matches the given predicate function.

f
findIndex

Finds the index of the first item in an array that matches the given predicate function.

f
findKey

Finds the key of the first element in the object that satisfies the provided testing function.

f
findLastIndex

Iterates through an array in reverse order and returns the index of the first item that matches the given predicate function.

f
first

Returns the first element of an array or undefined if the array is empty.

f
flatMap

Maps each element in the array using the iteratee function and flattens the result up to the specified depth.

f
flatMapDeep

Recursively maps each element in an array using a provided iteratee function and then deeply flattens the resulting array.

f
flatten

Flattens an array up to the specified depth.

f
flattenDeep

Flattens all depths of a nested array.

f
flattenDepth

Flattens an array up to the specified depth.

f
flattenObject

Flattens a nested object into a single level object with dot-separated keys.

f
flip

Reverses the order of arguments for a given function.

f
floor

Computes number rounded down to precision.

f
flow

Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.

f
flowRight

Creates a new function that executes the given functions in sequence from right to left. The return value of the previous function is passed as an argument to the next function.

f
forEach

Iterates over each element of the array invoking the provided callback function for each element.

f
forEachRight

Iterates over elements of 'arr' from right to left and invokes 'callback' for each element.

f
fromPairs

Converts an array of key-value pairs into an object.

f
get

Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.

f
groupBy

Groups the elements of an array based on a provided key-generating function.

f
has

Checks if a given path exists within an object.

f
head

Returns the first element of an array or undefined if the array is empty.

f
identity

Returns the input value unchanged.

f
includes

Checks if an item is included in an array.

f
indexOf

Finds the index of the first occurrence of a value in an array.

f
initial

Returns an empty array when the input is a tuple containing exactly one element.

f
inRange

Checks if the value is less than the maximum.

f
intersection

Returns the intersection of multiple arrays.

f
intersectionBy

Returns the intersection of multiple arrays after applying the iteratee function to their elements.

f
intersectionWith

Returns the intersection of two arrays based on a custom equality function.

f
invariant

Asserts that a given condition is true. If the condition is false, an error is thrown with the provided message.

f
invert

Inverts the keys and values of an object. The keys of the input object become the values of the output object and vice versa.

f
invertBy

Creates a new object that reverses the keys and values of the given object, similar to the invert.

f
isArguments

Checks if the given value is an arguments object.

f
isArray

Checks if the given value is an array.

f
isArrayBuffer

Checks if a given value is ArrayBuffer.

f
isArrayLike

Checks if value is array-like.

f
isArrayLikeObject

Checks if the given value is a non-primitive, array-like object.

f
isBlob

Checks if the given value is a Blob.

f
isBoolean

Checks if the given value is boolean.

f
isDate

Checks if value is a Date object.

f
isEmpty

Checks if a given value is empty.

f
isEqual

Checks if two values are equal, including support for Date, RegExp, and deep object comparison.

f
isEqualWith

Compares two values for equality using a custom comparison function.

f
isError

Checks if value is an Error object.

f
isFile

Checks if the given value is a File.

f
isFinite

Checks if value is a finite number.

f
isFunction

Checks if value is a function.

f
isInteger

Checks if value is an integer.

f
isJSONArray

Checks if a given value is a valid JSON array.

f
isJSONObject

Checks if a value is a JSON object.

f
isJSONValue

Checks if a given value is a valid JSON value.

f
isLength

Checks if a given value is a valid length.

f
isMap

Checks if a given value is Map.

f
isMatch

Checks if the target matches the source by comparing their structures and values. This function supports deep comparison for objects, arrays, maps, and sets.

f
isNaN

Checks if the value is NaN.

f
isNil

Checks if a given value is null or undefined.

f
isNotNil

Checks if the given value is not null nor undefined.

f
isNull

Checks if the given value is null.

f
isNumber

Checks if a given value is a number.

f
isObject

Checks if the given value is an object. An object is a value that is not a primitive type (string, number, boolean, symbol, null, or undefined).

f
isObjectLike

Checks if the given value is object-like.

f
isPlainObject

Checks if a given value is a plain object.

f
isPrimitive

Checks whether a value is a JavaScript primitive. JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.

f
isRegExp

Checks if value is a RegExp.

f
isSafeInteger

Checks if value is a safe integer (between -(253 – 1) and (253 – 1), inclusive).

f
isSet

Checks if a given value is Set.

f
isString

Checks if a given value is string.

f
isSubset

Checks if the subset array is entirely contained within the superset array.

f
isSubsetWith

Checks if the subset array is entirely contained within the superset array based on a custom equality function.

f
isSymbol

Check whether a value is a symbol.

f
isTypedArray

Checks if a value is a TypedArray.

f
isUndefined

Checks if the given value is undefined.

f
isWeakMap

Checks if the given value is a WeakMap.

f
isWeakSet

Checks if the given value is a WeakSet.

f
iteratee

Returns a identity function when value is null or undefined.

f
join

Joins elements of an array into a string.

f
kebabCase

Converts a string to kebab case.

f
keyBy

Maps each element of an array based on a provided key-generating function.

f
last

Returns the last element of an array.

f
lowerCase

Converts a string to lower case.

f
lowerFirst

Converts the first character of string to lower case.

f
mapKeys

Creates a new object with the same values as the given object, but with keys generated by running each own enumerable property of the object through the iteratee function.

f
mapValues

Creates a new object with the same keys as the given object, but with values generated by running each own enumerable property of the object through the iteratee function.

f
matches

Creates a function that performs a deep comparison between a given target and the source object.

f
matchesProperty

Creates a function that checks if a given target object matches a specific property value.

f
max

Finds the element in an array that has the maximum value.

f
maxBy

Finds the element in an array that has the maximum value when applying the getValue function to each element.

f
mean

Calculates the average of an array of numbers.

f
meanBy

Calculates the average of an array of numbers when applying the getValue function to each element.

f
median

Calculates the median of an array of numbers.

f
medianBy

Calculates the median of an array of elements when applying the getValue function to each element.

f
memoize

Creates a memoized version of the provided function. The memoized function caches results based on the argument it receives, so if the same argument is passed again, it returns the cached result instead of recomputing it.

I
MemoizeCache

Represents a cache for memoization, allowing storage and retrieval of computed values.

f
merge

Merges the properties of one or more source objects into the target object.

f
mergeWith

Merges the properties of one or more source objects into the target object.

f
min

Finds the element in an array that has the minimum value.

f
minBy

Finds the element in an array that has the minimum value when applying the getValue function to each element.

f
negate

Creates a function that negates the result of the predicate function.

f
noop

A no-operation function that does nothing. This can be used as a placeholder or default function.

f
omit

Creates a new object with specified keys omitted.

f
omitBy

Creates a new object composed of the properties that do not satisfy the predicate function.

f
once

Creates a function that is restricted to invoking the provided function func once. Repeated calls to the function will return the value from the first invocation.

f
orderBy

Sorts an array of objects based on multiple properties and their corresponding order directions.

f
pad

Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length. If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged.

f
padEnd

Pads the end of a string with a given character until it reaches the specified length.

f
padStart

Pads the start of a string with a given character until it reaches the specified length.

f
parseInt

Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used unless string is a hexadecimal, in which case a radix of 16 is used.

f
N
partial

Creates a function that invokes func with partialArgs prepended to the arguments it receives. This method is like bind except it does not alter the this binding.

v
partial.placeholder
No documentation available
f
N
partialRight

This method is like partial except that partially applied arguments are appended to the arguments it receives.

v
partialRight.placeholder
No documentation available
f
partition

Splits an array into two groups based on a predicate function.

f
pascalCase

Converts a string to Pascal case.

f
pick

Creates a new object composed of the picked object properties.

f
pickBy

Creates a new object composed of the properties that satisfy the predicate function.

f
property

Creates a function that returns the value at a given path of an object.

f
pullAt

Removes elements from an array at specified indices and returns the removed elements.

f
random

Generate a random number within 0 and 1.

f
randomInt

Generates a random integer between 0 (inclusive) and the given maximum (exclusive).

f
range

Returns an array of numbers from 0 (inclusive) to end (exclusive), incrementing by 1.

f
rangeRight

Returns an array of numbers from end (exclusive) to 0 (inclusive), decrementing by 1.

f
rearg

Creates a function that invokes func with arguments arranged according to the specified indices where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.

f
repeat

Repeats the given string n times.

f
replace

Replaces the matched pattern with the replacement string.

f
rest

Creates a function that transforms the arguments of the provided function func. The transformed arguments are passed to func such that the arguments starting from a specified index are grouped into an array, while the previous arguments are passed as individual elements.

f
round

Computes number rounded to precision.

f
sample

Returns a random element from an array.

f
sampleSize

Returns a sample element array of a specified size.

f
set

Sets the value at the specified path of the given object. If any part of the path does not exist, it will be created.

f
shuffle

Randomizes the order of elements in an array using the Fisher-Yates algorithm.

f
size

Returns the length of an array, string, or object.

f
slice

Create a slice of array from start up to, but not including, end.

f
snakeCase

Converts a string to snake case.

f
some

Checks if there is an element in an array that is truthy.

f
sortBy

Sorts an array of objects based on multiple properties and their corresponding order directions.

f
spread

Creates a new function that spreads elements of an array argument into individual arguments for the original function. The array argument is positioned based on the argsIndex parameter.

f
startCase

Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.

f
startsWith

Checks if a string contains another string at the beginning of the string.

f
sum

Computes the sum of the number values in array.

f
sumBy

Computes the sum of the number values in array.

f
tail

Returns a new array with all elements except for the first.

f
take

Returns a new array containing the first count elements from the input array arr. If count is greater than the length of arr, the entire array is returned.

f
takeRight

Returns a new array containing the last count elements from the input array arr. If count is greater than the length of arr, the entire array is returned.

f
takeRightWhile

Takes elements from the end of the array while the predicate function returns true.

f
takeWhile

Returns a new array containing the leading elements of the provided array that satisfy the provided predicate function. It stops taking elements as soon as an element does not satisfy the predicate.

f
template

Compiles a template string into a function that can interpolate data properties.

f
throttle

Creates a throttled function that only invokes the provided function at most once per every throttleMs milliseconds. Subsequent calls to the throttled function within the wait time will not trigger the execution of the original function.

f
timeout

Returns a promise that rejects with a TimeoutError after a specified delay.

c
TimeoutError

An error class representing an timeout operation.

f
times

Invokes the getValue function n times, returning an array of the results.

f
toDefaulted

Creates a new object based on the provided object, applying default values from the sources to ensure that no properties are left undefined. It assigns default values to properties that are either undefined or come from Object.prototype.

f
toFilled

Creates a new array filled with the specified value from the start position up to, but not including, the end position. This function does not mutate the original array.

f
toFinite

Converts value to a finite number.

f
toInteger

Converts value to an integer.

f
toLength

Converts the value to a valid index. A valid index is an integer that is greater than or equal to 0 and less than or equal to 2^32 - 1.

f
toMerged

Merges the properties of the source object into a deep clone of the target object. Unlike merge, This function does not modify the original target object.

f
toNumber

Converts value to a number.

f
toPath

Converts a deep key string into an array of path segments.

f
toSafeInteger

Converts value to a safe integer.

f
toString

Converts value to a string.

f
trim

Removes leading and trailing whitespace or specified characters from a string.

f
trimEnd

Removes trailing whitespace or specified characters from a string.

f
trimStart

Removes leading whitespace or specified characters from a string.

f
unary

Creates a function that accepts up to one argument, ignoring any additional arguments.

f
unescape

Converts the HTML entities &amp;, &lt;, &gt;, &quot;, and &#39; in str to their corresponding characters. It is the inverse of escape.

f
union

This function takes multiple arrays and returns a new array containing only the unique values from all input arrays, preserving the order of their first occurrence.

f
unionBy

Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality.

f
unionWith

Creates an array of unique values from two given arrays based on a custom equality function.

f
uniq

Creates a duplicate-free version of an array.

f
uniqBy

Creates a duplicate-free version of an array using a transform function for comparison.

f
uniqueId

Generates a unique identifier, optionally prefixed with a given string.

f
uniqWith

Returns a new array containing only the unique elements from the original array, based on the values returned by the comparator function.

f
unset

Removes the property at the given path of the object.

f
unzip

Gathers elements in the same position in an internal array from a grouped array of elements and returns them as a new array.

f
unzipWith

Unzips an array of arrays, applying an iteratee function to regrouped elements.

f
upperCase

Converts a string to upper case.

f
upperFirst

Converts the first character of string to upper case.

f
without

Creates an array that excludes all specified values.

f
withTimeout

Executes an async function and enforces a timeout.

f
words

Splits string into an array of its words, treating spaces and punctuation marks as separators.

f
xor

Computes the symmetric difference between two arrays. The symmetric difference is the set of elements which are in either of the arrays, but not in their intersection.

f
xorBy

Computes the symmetric difference between two arrays using a custom mapping function. The symmetric difference is the set of elements which are in either of the arrays, but not in their intersection, determined by the result of the mapping function.

f
xorWith

Computes the symmetric difference between two arrays using a custom equality function. The symmetric difference is the set of elements which are in either of the arrays, but not in their intersection.

f
zip

Combines multiple arrays into a single array of tuples.

f
zipObject

Combines two arrays, one of property names and one of corresponding values, into a single object.

f
zipObjectDeep

Creates a deeply nested object given arrays of paths and values.

f
zipWith

Combines multiple arrays into a single array using a custom combiner function.