An error class representing an aborted operation.
Creates a function that only executes starting from the n
-th call.
The provided function will be invoked starting from the n
-th call.
Creates a function that invokes func, with up to n arguments, ignoring any additional arguments.
Retrieves elements from an array at the specified indices.
Creates a function that limits the number of times the given function (func
) can be called.
Converts a string to camel case.
Converts the first character of string to upper case and the remaining to lower case.
Splits an array into smaller arrays of a specified length.
Clamps a number within the inclusive upper bound.
Creates a shallow clone of the given object.
Creates a deep clone of the given object.
Removes falsey values (false, null, 0, 0n, '', undefined, NaN) from an array.
Converts a string to constant case.
Count the occurrences of each item in an array based on a transformation function.
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.
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.
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.
Converts a string by replacing special characters and diacritical marks with their ASCII equivalents. For example, "Crème brûlée" becomes "Creme brulee".
Delays the execution of code for a specified number of milliseconds.
Computes the difference between two arrays.
Computes the difference between two arrays after mapping their elements through a provided function.
Computes the difference between two arrays based on a custom equality function.
Removes a specified number of elements from the beginning of an array and returns the rest.
Removes a specified number of elements from the end of an array and returns the rest.
Removes elements from the end of an array until the predicate returns false.
Removes elements from the beginning of an array until the predicate returns false.
Converts the characters "&", "<", ">", '"', and "'" in str
to their corresponding HTML entities.
For example, "<" becomes "<".
Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in str
.
Fills the whole array with a specified value.
Finds the key of the first element in the object that satisfies the provided testing function.
Maps each element in the array using the iteratee function and flattens the result up to the specified depth.
Recursively maps each element in an array using a provided iteratee function and then deeply flattens the resulting array.
Flattens an array up to the specified depth.
Flattens all depths of a nested array.
Flattens a nested object into a single level object with dot-separated keys.
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.
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.
Iterates over elements of 'arr' from right to left and invokes 'callback' for each element.
Groups the elements of an array based on a provided key-generating function.
Returns the first element of an array.
Returns the input value unchanged.
Returns an empty array when the input is a tuple containing exactly one element.
Checks if the value is less than the maximum.
Returns the intersection of two arrays.
Returns the intersection of two arrays based on a mapping function.
Returns the intersection of two arrays based on a custom equality function.
Asserts that a given condition is true. If the condition is false, an error is thrown with the provided message.
Inverts the keys and values of an object. The keys of the input object become the values of the output object and vice versa.
Checks if a given value is ArrayBuffer
.
Checks if the given value is a Blob.
Checks if the given value is boolean.
Checks if value
is a Date object.
Checks if two values are equal, including support for Date
, RegExp
, and deep object comparison.
Compares two values for equality using a custom comparison function.
Checks if value
is an Error object.
Checks if the given value is a File.
Checks if value
is a function.
Checks if a given value is a valid JSON array.
Checks if a value is a JSON object.
Checks if a given value is a valid JSON value.
Checks if a given value is a valid length.
Checks if a given value is Map
.
Checks if a given value is null or undefined.
Checks if the given value is not null nor undefined.
Checks if the given value is null.
Checks if a given value is a plain object.
Checks whether a value is a JavaScript primitive. JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.
Checks if value
is a RegExp.
Checks if a given value is Set
.
Checks if a given value is string.
Checks if the subset
array is entirely contained within the superset
array.
Checks if the subset
array is entirely contained within the superset
array based on a custom equality function.
Check whether a value is a symbol.
Checks if a value is a TypedArray.
Checks if the given value is undefined.
Checks if the given value is a WeakMap
.
Checks if the given value is a WeakSet
.
Converts a string to kebab case.
Maps each element of an array based on a provided key-generating function.
Returns the last element of an array.
Converts a string to lower case.
Converts the first character of string to lower case.
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.
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.
Finds the element in an array that has the maximum value when applying
the getValue
function to each element.
Calculates the average of an array of numbers.
Calculates the average of an array of numbers when applying
the getValue
function to each element.
Calculates the median of an array of numbers.
Calculates the median of an array of elements when applying
the getValue
function to each element.
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.
Merges the properties of the source object into the target object.
Merges the properties of the source object into the target object.
Finds the element in an array that has the minimum value when applying
the getValue
function to each element.
Creates a function that negates the result of the predicate function.
A no-operation function that does nothing. This can be used as a placeholder or default function.
Creates a new object with specified keys omitted.
Creates a new object composed of the properties that do not satisfy the predicate function.
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.
Sorts an array of objects based on the given criteria
and their corresponding order directions.
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.
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.
This method is like partial
except that partially applied arguments are appended to the arguments it receives.
Splits an array into two groups based on a predicate function.
Converts a string to Pascal case.
Creates a new object composed of the picked object properties.
Creates a new object composed of the properties that satisfy the predicate function.
Removes elements from an array at specified indices and returns the removed elements.
Generate a random number within the given range.
Generates a random integer between 0 (inclusive) and the given maximum (exclusive).
Returns an array of numbers from 0
(inclusive) to end
(exclusive), incrementing by 1
.
Returns an array of numbers from end
(exclusive) to 0
(inclusive), decrementing by 1
.
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.
Rounds a number to a specified precision.
Returns a random element from an array.
Returns a sample element array of a specified size
.
Randomizes the order of elements in an array using the Fisher-Yates algorithm.
Converts a string to snake case.
Sorts an array of objects based on the given criteria
.
Creates a new function that spreads elements of an array argument into individual arguments for the original function.
Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.
Calculates the sum of an array of numbers.
Calculates the sum of an array of numbers when applying
the getValue
function to each element.
Returns an empty array when the input is a single-element array.
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.
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.
Takes elements from the end of the array while the predicate function returns true
.
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.
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.
Returns a promise that rejects with a TimeoutError
after a specified delay.
An error class representing an timeout operation.
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.
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.
Removes leading and trailing whitespace or specified characters from a string.
Removes trailing whitespace or specified characters from a string.
Removes leading whitespace or specified characters from a string.
Creates a function that accepts up to one argument, ignoring any additional arguments.
Converts the HTML entities &
, <
, >
, "
, and '
in str
to their corresponding characters.
It is the inverse of escape
.
Creates an array of unique values from all given arrays.
Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality.
Creates an array of unique values from two given arrays based on a custom equality function.
Creates a duplicate-free version of an array.
Returns a new array containing only the unique elements from the original array, based on the values returned by the mapper function.
Returns a new array containing only the unique elements from the original array, based on the values returned by the comparator function.
Gathers elements in the same position in an internal array from a grouped array of elements and returns them as a new array.
Unzips an array of arrays, applying an iteratee
function to regrouped elements.
Converts a string to upper case.
Converts the first character of string to upper case.
Creates an array that excludes all specified values.
Executes an async function and enforces a timeout.
Splits string
into an array of its words, treating spaces and punctuation marks as separators.
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.
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.
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.
Combines multiple arrays into a single array of tuples.
Combines two arrays, one of property names and one of corresponding values, into a single object.
Combines multiple arrays into a single array using a custom combiner function.
An error class representing an aborted operation.
Creates a function that only executes starting from the n
-th call.
The provided function will be invoked starting from the n
-th call.
Creates a function that invokes func, with up to n
arguments, ignoring any additional arguments.
Retrieves elements from an array at the specified indices.
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.
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.
Creates a function that invokes func
with the this
binding of thisArg
and partials
prepended to the arguments it receives.
Creates a function that invokes the method at object[key]
with partialArgs
prepended to the arguments it receives.
Converts a string to camel case.
Converts the first character of string to upper case and the remaining to lower case.
Casts value as an array if it's not one.
Computes number rounded up to precision.
Splits an array into smaller arrays of a specified length.
Clamps a number within the inclusive upper bound.
Creates a shallow clone of the given object.
Creates a deep clone of the given object.
Removes falsey values (false, null, 0, 0n, '', undefined, NaN) from an array.
Concatenates multiple arrays and values into a single array.
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
.
Checks if object
conforms to source
by invoking the predicate properties of source
with the corresponding property values of object
.
Creates a new function that always returns undefined
.
Converts a string to constant case.
Count the occurrences of each item in an array based on a transformation function.
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.
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.
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.
Converts a string by replacing special characters and diacritical marks with their ASCII equivalents. For example, "Crème brûlée" becomes "Creme brulee".
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
.
Returns the default value for null
, undefined
, and NaN
.
Defers invoking the func
until the current call stack has cleared. Any additional arguments are provided to func when it's invoked.
Delays the execution of code for a specified number of milliseconds.
Computes the difference between an array and multiple arrays.
Computes the difference between an array and another array using an iteratee function.
Computes the difference between two arrays based on a custom equality function.
Removes a specified number of elements from the beginning of an array and returns the rest.
Removes a specified number of elements from the end of an array and returns the rest.
Drops elements from the end of an array while the predicate function returns truthy.
Drops elements from the beginning of an array while the predicate function returns truthy.
Iterates over each element of the array invoking the provided callback function for each element.
Checks if a string contains another string at the end of the string.
Performs a SameValueZero
comparison between two values to determine if they are equivalent.
Converts the characters "&", "<", ">", '"', and "'" in str
to their corresponding HTML entities.
For example, "<" becomes "<".
Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in str
.
Checks if all elements in an array are truthy.
Fills the whole array with a specified value.
Filters items from a array and returns an array of elements.
Finds the first item in an array that matches the given predicate function.
Finds the index of the first item in an array that matches the given predicate function.
Finds the key of the first element in the object that satisfies the provided testing function.
Iterates through an array in reverse order and returns the index of the first item that matches the given predicate function.
Returns the first element of an array or undefined
if the array is empty.
Maps each element in the array using the iteratee function and flattens the result up to the specified depth.
Recursively maps each element in an array using a provided iteratee function and then deeply flattens the resulting array.
Flattens an array up to the specified depth.
Flattens all depths of a nested array.
Flattens an array up to the specified depth.
Flattens a nested object into a single level object with dot-separated keys.
Reverses the order of arguments for a given function.
Computes number rounded down to precision.
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.
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.
Iterates over each element of the array invoking the provided callback function for each element.
Iterates over elements of 'arr' from right to left and invokes 'callback' for each element.
Converts an array of key-value pairs into an object.
Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
Groups the elements of an array based on a provided key-generating function.
Checks if a given path exists within an object.
Returns the first element of an array or undefined
if the array is empty.
Returns the input value unchanged.
Checks if an item is included in an array.
Finds the index of the first occurrence of a value in an array.
Returns an empty array when the input is a tuple containing exactly one element.
Checks if the value is less than the maximum.
Returns the intersection of multiple arrays.
Returns the intersection of multiple arrays after applying the iteratee function to their elements.
Returns the intersection of two arrays based on a custom equality function.
Asserts that a given condition is true. If the condition is false, an error is thrown with the provided message.
Inverts the keys and values of an object. The keys of the input object become the values of the output object and vice versa.
Creates a new object that reverses the keys and values of the given object, similar to the invert.
Checks if the given value is an arguments object.
Checks if the given value is an array.
Checks if a given value is ArrayBuffer
.
Checks if value
is array-like.
Checks if the given value is a non-primitive, array-like object.
Checks if the given value is a Blob.
Checks if the given value is boolean.
Checks if value
is a Date object.
Checks if a given value is empty.
Checks if two values are equal, including support for Date
, RegExp
, and deep object comparison.
Compares two values for equality using a custom comparison function.
Checks if value
is an Error object.
Checks if the given value is a File.
Checks if value
is a finite number.
Checks if value
is a function.
Checks if value
is an integer.
Checks if a given value is a valid JSON array.
Checks if a value is a JSON object.
Checks if a given value is a valid JSON value.
Checks if a given value is a valid length.
Checks if a given value is Map
.
Checks if the target matches the source by comparing their structures and values. This function supports deep comparison for objects, arrays, maps, and sets.
Checks if the value is NaN.
Checks if a given value is null or undefined.
Checks if the given value is not null nor undefined.
Checks if the given value is null.
Checks if a given value is a number.
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).
Checks if the given value is object-like.
Checks if a given value is a plain object.
Checks whether a value is a JavaScript primitive. JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.
Checks if value
is a RegExp.
Checks if value
is a safe integer (between -(253 – 1) and (253 – 1), inclusive).
Checks if a given value is Set
.
Checks if a given value is string.
Checks if the subset
array is entirely contained within the superset
array.
Checks if the subset
array is entirely contained within the superset
array based on a custom equality function.
Check whether a value is a symbol.
Checks if a value is a TypedArray.
Checks if the given value is undefined.
Checks if the given value is a WeakMap
.
Checks if the given value is a WeakSet
.
Returns a identity
function when value
is null
or undefined
.
Joins elements of an array into a string.
Converts a string to kebab case.
Maps each element of an array based on a provided key-generating function.
Returns the last element of an array.
Converts a string to lower case.
Converts the first character of string to lower case.
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.
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.
Creates a function that performs a deep comparison between a given target and the source object.
Creates a function that checks if a given target object matches a specific property value.
Finds the element in an array that has the maximum value.
Finds the element in an array that has the maximum value when applying
the getValue
function to each element.
Calculates the average of an array of numbers.
Calculates the average of an array of numbers when applying
the getValue
function to each element.
Calculates the median of an array of numbers.
Calculates the median of an array of elements when applying
the getValue
function to each element.
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.
Merges the properties of one or more source objects into the target object.
Merges the properties of one or more source objects into the target object.
Finds the element in an array that has the minimum value.
Finds the element in an array that has the minimum value when applying
the getValue
function to each element.
Creates a function that negates the result of the predicate function.
A no-operation function that does nothing. This can be used as a placeholder or default function.
Creates a new object with specified keys omitted.
Creates a new object composed of the properties that do not satisfy the predicate function.
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.
Sorts an array of objects based on multiple properties and their corresponding order directions.
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.
Pads the end of a string with a given character until it reaches the specified length.
Pads the start of a string with a given character until it reaches the specified length.
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.
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.
This method is like partial
except that partially applied arguments are appended to the arguments it receives.
Splits an array into two groups based on a predicate function.
Converts a string to Pascal case.
Creates a new object composed of the picked object properties.
Creates a new object composed of the properties that satisfy the predicate function.
Creates a function that returns the value at a given path of an object.
Removes elements from an array at specified indices and returns the removed elements.
Generate a random number within 0 and 1.
Generates a random integer between 0 (inclusive) and the given maximum (exclusive).
Returns an array of numbers from 0
(inclusive) to end
(exclusive), incrementing by 1
.
Returns an array of numbers from end
(exclusive) to 0
(inclusive), decrementing by 1
.
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.
Repeats the given string n times.
Replaces the matched pattern with the replacement string.
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.
Computes number rounded to precision.
Returns a random element from an array.
Returns a sample element array of a specified size
.
Sets the value at the specified path of the given object. If any part of the path does not exist, it will be created.
Randomizes the order of elements in an array using the Fisher-Yates algorithm.
Returns the length of an array, string, or object.
Create a slice of array
from start
up to, but not including, end
.
Converts a string to snake case.
Checks if there is an element in an array that is truthy.
Sorts an array of objects based on multiple properties and their corresponding order directions.
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.
Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.
Checks if a string contains another string at the beginning of the string.
Computes the sum of the number
values in array
.
Computes the sum of the number
values in array
.
Returns a new array with all elements except for the first.
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.
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.
Takes elements from the end of the array while the predicate function returns true
.
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.
Compiles a template string into a function that can interpolate data properties.
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.
Returns a promise that rejects with a TimeoutError
after a specified delay.
An error class representing an timeout operation.
Invokes the getValue function n times, returning an array of the results.
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
.
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.
Converts value
to a finite number.
Converts value
to an integer.
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
.
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.
Converts value
to a number.
Converts a deep key string into an array of path segments.
Converts value
to a safe integer.
Converts value
to a string.
Removes leading and trailing whitespace or specified characters from a string.
Removes trailing whitespace or specified characters from a string.
Removes leading whitespace or specified characters from a string.
Creates a function that accepts up to one argument, ignoring any additional arguments.
Converts the HTML entities &
, <
, >
, "
, and '
in str
to their corresponding characters.
It is the inverse of escape
.
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.
Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality.
Creates an array of unique values from two given arrays based on a custom equality function.
Creates a duplicate-free version of an array.
Creates a duplicate-free version of an array using a transform function for comparison.
Generates a unique identifier, optionally prefixed with a given string.
Returns a new array containing only the unique elements from the original array, based on the values returned by the comparator function.
Removes the property at the given path of the object.
Gathers elements in the same position in an internal array from a grouped array of elements and returns them as a new array.
Unzips an array of arrays, applying an iteratee
function to regrouped elements.
Converts a string to upper case.
Converts the first character of string to upper case.
Creates an array that excludes all specified values.
Executes an async function and enforces a timeout.
Splits string
into an array of its words, treating spaces and punctuation marks as separators.
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.
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.
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.
Combines multiple arrays into a single array of tuples.
Combines two arrays, one of property names and one of corresponding values, into a single object.
Creates a deeply nested object given arrays of paths and values.
Combines multiple arrays into a single array using a custom combiner function.