Creates a lodash object which wraps the given value to enable intuitive method chaining.
In addition to Lo-Dash methods, wrappers also have the following Array methods: concat, join, pop, push, reverse, shift, slice, sort, splice, and unshift
Chaining is supported in custom builds as long as the value method is implicitly or explicitly included in the build.
The chainable wrapper functions are: after, assign, bind, bindAll, bindKey, chain, chunk, compact, compose, concat, countBy, createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy, keyBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min, object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject, remove, rest, reverse, sample, shuffle, slice, sort, sortBy, splice, tap, throttle, times, toArray, transform, union, uniq, unset, unshift, unzip, values, where, without, wrap, and zip
The non-chainable wrapper functions are: clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast, findLastIndex, findLastKey, has, identity, indexOf, isArguments, isArray, isBoolean, isDate, isElement, isEmpty, isEqual, isFinite, isFunction, isNaN, isNull, isNumber, isObject, isPlainObject, isRegExp, isString, isUndefined, join, lastIndexOf, mixin, noConflict, parseInt, pop, random, reduce, reduceRight, result, shift, size, some, sortedIndex, runInContext, template, unescape, uniqueId, and value
The wrapper functions first and last return wrapped values when n is provided, otherwise they return unwrapped values.
Explicit chaining can be enabled by using the _.chain method.
Array * Chain * Collection * Date * Functions * Lang * Math * Number * Object * String * Utility *
Array * Chain * Collection * Date * Functions * Lang * Math * Number * Object * String * Utility *
Array * Chain * Collection * Date * Functions * Lang * Math * Number * Object * String * Utility *
Array * Chain * Collection * Date * Functions * Lang * Math * Number * Object * String * Utility *
Array * Chain * Collection * Date * Functions * Lang * Math * Number * Object * String * Utility *
Array * Chain * Collection * Date * Functions * Lang * Math * Number * Object * String * Utility *
The semantic version number.
Creates a function that invokes func with the this binding of thisArg and prepends any additional _.bind arguments to those provided to the bound function.
The _.bind.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for partially applied arguments.
Note: Unlike native Function#bind this method does not set the "length" property of bound functions.
Creates a function that invokes the method at object[key] and prepends any additional _.bindKey arguments to those provided to the bound function.
This method differs from _.bind by allowing bound functions to reference methods that may be redefined or don’t yet exist. See Peter Michaux’s article for more details.
The _.bindKey.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for partially applied arguments.
Creates a function that memoizes the result of func. If resolver is provided it determines the cache key for storing the result based on the arguments provided to the memoized function. By default, the first argument provided to the memoized function is coerced to a string and used as the cache key. The func is invoked with the this binding of the memoized function.
Creates a function that, when called, invokes func with any additional partial arguments prepended to those provided to the new function. This method is similar to _.bind except it does not alter the this binding.
This method is like _.partial except that partial arguments are appended to those provided to the new function.
By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby (ERB). Change the following template settings to use alternative delimiters.
Adds two numbers.
The first number to add.
The second number to add.
Returns the sum.
The opposite of _.before; this method creates a function that invokes func once it’s called n or more times.
The number of calls before func is invoked.
The function to restrict.
Returns the new restricted function.
Creates a function that accepts up to n arguments ignoring any additional arguments.
The function to cap arguments for.
The arity cap.
Returns the new function.
Assigns own enumerable properties of source objects to the destination object. Source objects are applied from left to right. Subsequent sources overwrite property assignments of previous sources.
Note: This method mutates object
and is loosely based on
Object.assign
.
The destination object.
Returns object
.
This method is like _.assign
except that it iterates over own and
inherited source properties.
Note: This method mutates object
.
The destination object.
Returns object
.
This method is like _.assignIn
except that it accepts customizer
which
is invoked to produce the assigned values. If customizer
returns undefined
assignment is handled by the method instead. The customizer
is invoked
with five arguments: (objValue, srcValue, key, object, source).
Note: This method mutates object
.
The destination object.
Returns object
.
This method is like _.assign
except that it accepts customizer
which
is invoked to produce the assigned values. If customizer
returns undefined
assignment is handled by the method instead. The customizer
is invoked
with five arguments: (objValue, srcValue, key, object, source).
Note: This method mutates object
.
The destination object.
Returns object
.
Creates an array of elements corresponding to the given keys, or indexes, of collection. Keys may be specified as individual arguments or as arrays of keys.
The collection to iterate over.
The property names or indexes of elements to pick, specified individually or in arrays.
Returns the new array of picked elements.
Attempts to invoke func, returning either the result or the caught error object. Any additional arguments are provided to func when it’s invoked.
The function to attempt.
Returns the func result or error object.
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.
The number of calls at which func is no longer invoked.
The function to restrict.
Returns the new restricted function.
Binds methods of an object to the object itself, overwriting the existing method. Method names may be specified as individual arguments or as arrays of method names. If no method names are provided all enumerable function properties, own and inherited, of object are bound.
Note: This method does not set the "length" property of bound functions.
The object to bind and assign the bound methods to.
The object method names to bind, specified as individual method names or arrays of method names.
Returns object.
Converts string to camel case.
The string to convert.
Returns the camel cased string.
Converts the first character of string to upper case and the remaining to lower case.
The string to capitalize.
Returns the capitalized string.
Calculates n rounded up to precision.
The number to round up.
The precision to round up to.
Returns the rounded up number.
Creates a lodash object that wraps value with explicit method chaining enabled.
The value to wrap.
Returns the new lodash wrapper instance.
Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the final chunk will be the remaining elements.
The array to process.
The length of each chunk.
Returns the new array containing chunks.
Clamps number
within the inclusive lower
and upper
bounds.
The number to clamp.
The upper bound.
Returns the clamped number.
Creates a shallow clone of value
.
Note: This method is loosely based on the
structured clone algorithm
and supports cloning arrays, array buffers, booleans, date objects, maps,
numbers, Object
objects, regexes, sets, strings, symbols, and typed
arrays. The own enumerable properties of arguments
objects are cloned
as plain objects. An empty object is returned for uncloneable values such
as error objects, functions, DOM nodes, and WeakMaps.
The value to clone.
Returns the cloned value.
Creates a shallow clone of value
.
Note: This method is loosely based on the
structured clone algorithm
and supports cloning arrays, array buffers, booleans, date objects, maps,
numbers, Object
objects, regexes, sets, strings, symbols, and typed
arrays. The own enumerable properties of arguments
objects are cloned
as plain objects. An empty object is returned for uncloneable values such
as error objects, functions, DOM nodes, and WeakMaps.
The value to clone.
Returns the cloned value.
This method is like _.clone
except that it recursively clones value
.
The value to recursively clone.
Returns the deep cloned value.
Creates a deep clone of value. If customizer is provided it’s invoked to produce the cloned values. If customizer returns undefined cloning is handled by the method instead. The customizer is bound to thisArg and invoked with up to three argument; (value [, index|key, object]). Note: This method is loosely based on the structured clone algorithm. The enumerable properties of arguments objects and objects created by constructors other than Object are cloned to plain Object objects. An empty object is returned for uncloneable values such as functions, DOM nodes, Maps, Sets, and WeakMaps.
The value to deep clone.
The function to customize cloning values.
Returns the deep cloned value.
Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are falsey.
The array to compact.
(Array) Returns the new array of filtered values.
Creates a new array concatenating array
with any additional arrays
and/or values.
Returns the new concatenated array.
Creates a function that returns value.
The value to return from the new function.
Returns the new function.
Creates an object composed of keys generated from the results of running each element of collection through iteratee. The corresponding value of each key is the number of times the key was returned by iteratee. The iteratee is bound to thisArg and invoked with three arguments: (value, index|key, collection).
If a property name is provided for iteratee the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for iteratee the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The collection to iterate over.
The function invoked per iteration.
The this binding of iteratee.
Returns the composed aggregate object.
Creates an object that inherits from the given prototype object. If a properties object is provided its own enumerable properties are assigned to the created object.
The object to inherit from.
The properties to assign to the object.
Returns the new object.
Produces a callback bound to an optional thisArg. If func is a property name the created callback will return the property value for a given element. If func is an object the created callback will return true for elements that contain the equivalent object properties, otherwise it will return false.
The value to convert to a callback.
The this binding of the created callback.
The number of arguments the callback accepts.
A callback function.
Creates a function that accepts one or more arguments of func that when called either invokes func returning its result, if all func arguments have been provided, or returns a function that accepts one or more of the remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
The function to curry.
Returns the new curried function.
Creates a function that accepts one or more arguments of func that when called either invokes func returning its result, if all func arguments have been provided, or returns a function that accepts one or more of the remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
The function to curry.
Returns the new curried function.
Creates a function that accepts one or more arguments of func that when called either invokes func returning its result, if all func arguments have been provided, or returns a function that accepts one or more of the remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
The function to curry.
Returns the new curried function.
Creates a function that accepts one or more arguments of func that when called either invokes func returning its result, if all func arguments have been provided, or returns a function that accepts one or more of the remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
The function to curry.
Returns the new curried function.
Creates a function that accepts one or more arguments of func that when called either invokes func returning its result, if all func arguments have been provided, or returns a function that accepts one or more of the remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
The function to curry.
Returns the new curried function.
Creates a function that accepts one or more arguments of func that when called either invokes func returning its result, if all func arguments have been provided, or returns a function that accepts one or more of the remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
The function to curry.
The arity of func.
Returns the new curried function.
This method is like _.curry except that arguments are applied to func in the manner of _.partialRight instead of _.partial.
The function to curry.
Returns the new curried function.
This method is like _.curry except that arguments are applied to func in the manner of _.partialRight instead of _.partial.
The function to curry.
Returns the new curried function.
This method is like _.curry except that arguments are applied to func in the manner of _.partialRight instead of _.partial.
The function to curry.
Returns the new curried function.
This method is like _.curry except that arguments are applied to func in the manner of _.partialRight instead of _.partial.
The function to curry.
Returns the new curried function.
This method is like _.curry except that arguments are applied to func in the manner of _.partialRight instead of _.partial.
The function to curry.
Returns the new curried function.
This method is like _.curry except that arguments are applied to func in the manner of _.partialRight instead of _.partial.
The function to curry.
The arity of func.
Returns the new curried function.
Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked. The debounced function comes with a cancel method to cancel delayed invocations. Provide an options object to indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls to the debounced function return the result of the last func invocation.
Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only if the the debounced function is invoked more than once during the wait timeout.
See David Corbacho’s article for details over the differences between _.debounce and _.throttle.
The function to debounce.
The number of milliseconds to delay.
The options object.
Returns the new debounced function.
Deburrs string by converting latin-1 supplementary letters to basic latin letters and removing combining diacritical marks.
The string to deburr.
Returns the deburred string.
Assigns own enumerable properties of source object(s) to the destination object for all destination properties that resolve to undefined. Once a property is set, additional values of the same property are ignored.
Note: This method mutates object.
The destination object.
The source objects.
The destination object.
This method is like _.defaults except that it recursively assigns default properties.
The destination object.
The source objects.
Returns object.
Defers invoking the func until the current call stack has cleared. Any additional arguments are provided to func when it’s invoked.
The function to defer.
The arguments to invoke the function with.
Returns the timer id.
Invokes func after wait milliseconds. Any additional arguments are provided to func when it’s invoked.
The function to delay.
The number of milliseconds to delay invocation.
The arguments to invoke the function with.
Returns the timer id.
Creates an array of unique array values not included in the other provided arrays using SameValueZero for equality comparisons.
The array to inspect.
The arrays of values to exclude.
Returns the new array of filtered values.
This method is like _.difference except that it accepts iteratee which is invoked for each element of array and values to generate the criterion by which uniqueness is computed. The iteratee is invoked with one argument: (value).
The array to inspect.
The values to exclude.
The iteratee invoked per element.
Returns the new array of filtered values.
Creates an array of unique array
values not included in the other
provided arrays using SameValueZero
for equality comparisons.
The array to inspect.
Returns the new array of filtered values.
Creates a slice of array with n elements dropped from the beginning.
The array to query.
The number of elements to drop.
Returns the slice of array.
Creates a slice of array with n elements dropped from the end.
The array to query.
The number of elements to drop.
Returns the slice of array.
Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
If a property name is provided for predicate the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for predicate the created _.matches style callback returns true for elements that match the properties of the given object, else false.
The array to query.
The function invoked per iteration.
The this binding of predicate.
Returns the slice of array.
Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
If a property name is provided for predicate the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for predicate the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The array to query.
The function invoked per iteration.
The this binding of predicate.
Returns the slice of array.
Checks if string ends with the given target string.
The string to search.
The string to search for.
The position to search from.
Returns true if string ends with target, else false.
Performs a SameValueZero
comparison between two values to determine if they are equivalent.
The value to compare.
The other value to compare.
Returns true
if the values are equivalent, else false
.
Converts the characters "&", "<", ">", '"', "'", and "`" in string to their corresponding HTML entities.
Note: No other characters are escaped. To escape additional characters use a third-party library like he.
hough the ">" character is escaped for symmetry, characters like ">" and "/" don’t need escaping in HTML and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens’s article (under "semi-related fun fact") for more details.
Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59,
#102, #108, and #133 of the HTML5 Security Cheatsheet for more details.
When working with HTML you should always quote attribute values to reduce XSS vectors.
The string to escape.
Returns the escaped string.
Escapes the RegExp special characters "^", "$", "", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in string.
The string to escape.
Returns the escaped string.
Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate returns falsey. The predicate is invoked with three arguments: (value, index|key, collection).
The collection to iterate over.
The function invoked per iteration.
Returns true if all elements pass the predicate check, else false.
Fills elements of array with value from start up to, but not including, end.
Note: This method mutates array.
The array to fill.
The value to fill array with.
The start position.
The end position.
Returns array.
Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection).
If a property name is provided for predicate the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for predicate the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The collection to iterate over.
The function invoked per iteration.
The this binding of predicate.
Returns the new filtered array.
Iterates over elements of collection, returning the first element predicate returns truthy for. The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection).
If a property name is provided for predicate the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for predicate the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The collection to search.
The function invoked per iteration.
The this binding of predicate.
Returns the matched element, else undefined.
This method is like _.find except that it returns the index of the first element predicate returns truthy for instead of the element itself.
If a property name is provided for predicate the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for predicate the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The array to search.
The function invoked per iteration.
The this binding of predicate.
Returns the index of the found element, else -1.
This method is like _.find except that it returns the key of the first element predicate returns truthy for instead of the element itself.
If a property name is provided for predicate the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for predicate the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The object to search.
The function invoked per iteration.
The this binding of predicate.
Returns the key of the matched element, else undefined.
This method is like _.find except that it iterates over elements of a collection from right to left.
Searches for a value in this list.
The function called per iteration.
The this binding of callback.
The found element, else undefined.
This method is like _.findIndex except that it iterates over elements of collection from right to left.
If a property name is provided for predicate the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for predicate the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The array to search.
The function invoked per iteration.
The function invoked per iteration.
Returns the index of the found element, else -1.
This method is like _.findKey except that it iterates over elements of a collection in the opposite order.
If a property name is provided for predicate the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for predicate the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The object to search.
The function invoked per iteration.
The this binding of predicate.
Returns the key of the matched element, else undefined.
Creates an array of flattened values by running each element in array
through iteratee
and concating its result to the other mapped values.
The iteratee is invoked with three arguments: (value, index|key, array).
The array to iterate over.
Returns the new array.
Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise it’s only flattened a single level.
The array to flatten.
Specify a deep flatten.
Returns the new flattened array.
Recursively flattens a nested array.
The array to recursively flatten.
Returns the new flattened array.
Creates a function that invokes func
with arguments reversed.
The function to flip arguments for.
Returns the new function.
Calculates n rounded down to precision.
The number to round down.
The precision to round down to.
Returns the rounded down number.
Creates a function that returns the result of invoking the provided functions with the this binding of the created function, where each successive invocation is supplied the return value of the previous.
Functions to invoke.
Returns the new function.
This method is like _.flow except that it creates a function that invokes the provided functions from right to left.
Functions to invoke.
Returns the new function.
Iterates over elements of collection invoking iteratee for each element. The iteratee is bound to thisArg and invoked with three arguments: (value, index|key, collection). Iteratee functions may exit iteration early by explicitly returning false.
Note: As with other "Collections" methods, objects with a "length" property are iterated like arrays. To avoid this behavior _.forIn or _.forOwn may be used for object iteration.
The collection to iterate over.
The function invoked per iteration.
The this binding of iteratee.
This method is like _.forEach except that it iterates over elements of collection from right to left.
The collection to iterate over.
The function called per iteration.
The this binding of callback.
Iterates over own and inherited enumerable properties of an object invoking iteratee for each property. The iteratee is bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may exit iteration early by explicitly returning false.
The object to iterate over.
The function invoked per iteration.
The this binding of iteratee.
Returns object.
This method is like _.forIn except that it iterates over properties of object in the opposite order.
The object to iterate over.
The function invoked per iteration.
The this binding of iteratee.
Returns object.
Iterates over own enumerable properties of an object invoking iteratee for each property. The iteratee is bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may exit iteration early by explicitly returning false.
The object to iterate over.
The function invoked per iteration.
The this binding of iteratee.
Returns object.
This method is like _.forOwn except that it iterates over properties of object in the opposite order.
The object to iterate over.
The function invoked per iteration.
The this binding of iteratee.
Returns object.
The inverse of _.toPairs
; this method returns an object composed
from key-value pairs
.
Returns the new object.
Creates an array of function property names from own enumerable properties
of object
.
The object to inspect.
Returns the new array of property names.
Creates an array of function property names from own and inherited
enumerable properties of object
.
The object to inspect.
Returns the new array of property names.
Gets the property value at path of object. If the resolved value is undefined the defaultValue is used in its place.
The object to query.
The path of the property to get.
The value returned if the resolved value is undefined.
Returns the resolved value.
Creates an object composed of keys generated from the results of running each element of collection through iteratee. The corresponding value of each key is an array of the elements responsible for generating the key. The iteratee is bound to thisArg and invoked with three arguments: (value, index|key, collection).
If a property name is provided for iteratee the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for iteratee the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The collection to iterate over.
The function invoked per iteration.
The this binding of iteratee.
Returns the composed aggregate object.
Checks if value is greater than other.
The value to compare.
The other value to compare.
Returns true if value is greater than other, else false.
Checks if value is greater than or equal to other.
The value to compare.
The other value to compare.
Returns true if value is greater than or equal to other, else false.
Checks if path
is a direct property of object
.
The object to query.
The path to check.
Returns true
if path
exists, else false
.
Checks if path
is a direct or inherited property of object
.
The object to query.
The path to check.
Returns true
if path
exists, else false
.
Gets the first element of array.
The array to query.
Returns the first element of array.
This method returns the first argument provided to it.
Any value.
Returns value.
Checks if n is between start and up to but not including, end. If end is not specified it’s set to start with start then set to 0.
The number to check.
The start of the range.
The end of the range.
Returns true if n is in the range, else false.
Checks if target is in collection using SameValueZero for equality comparisons. If fromIndex is negative, it’s used as the offset from the end of collection.
The collection to search.
The value to search for.
The index to search from.
True if the target element is found, else false.
Gets the index at which the first occurrence of value
is found in array
using SameValueZero
for equality comparisons. If fromIndex
is negative, it's used as the offset
from the end of array
. If array
is sorted providing true
for fromIndex
performs a faster binary search.
The array to search.
The value to search for.
Returns the index of the matched value, else -1
.
Gets all but the last element of array.
The array to query.
Returns the slice of array.
Creates an array of unique values that are included in all of the provided arrays using SameValueZero for equality comparisons.
The arrays to inspect.
Returns the new array of shared values.
This method is like _.intersection
except that it accepts iteratee
which is invoked for each element of each arrays
to generate the criterion
by which uniqueness is computed. The iteratee is invoked with one argument: (value).
Returns the new array of shared values.
This method is like _.intersection
except that it accepts comparator
which is invoked to compare elements of arrays
. The comparator is invoked
with two arguments: (arrVal, othVal).
Returns the new array of shared values.
Creates an object composed of the inverted keys and values of object. If object contains duplicate values, subsequent values overwrite property assignments of previous values unless multiValue is true.
The object to invert.
Allow multiple values per key.
Returns the new inverted object.
Invokes the method named by methodName on each element in the collection returning an array of the results of each invoked method. Additional arguments will be provided to each invoked method. If methodName is a function it will be invoked for, and this bound to, each element in the collection.
The collection to iterate over.
The name of the method to invoke.
Arguments to invoke the method with.
Checks if value is classified as an arguments object.
The value to check.
Returns true if value is correctly classified, else false.
Checks if value is classified as an Array object.
The value to check.
Returns true if value is correctly classified, else false.
Checks if value
is array-like. A value is considered array-like if it's
not a function and has a value.length
that's an integer greater than or
equal to 0
and less than or equal to Number.MAX_SAFE_INTEGER
.
The value to check.
Returns true
if value
is array-like, else false
.
This method is like _.isArrayLike
except that it also checks if value
is an object.
The value to check.
Returns true
if value
is an array-like object, else false
.
Checks if value is classified as a boolean primitive or object.
The value to check.
Returns true if value is correctly classified, else false.
Checks if value is classified as a Date object.
The value to check.
Returns true if value is correctly classified, else false.
Checks if value is a DOM element.
The value to check.
Returns true if value is a DOM element, else false.
Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string, or jQuery-like collection with a length greater than 0 or an object with own enumerable properties.
The value to inspect.
Returns true if value is empty, else false.
Performs a deep comparison between two values to determine if they are equivalent.
Note: This method supports comparing arrays, array buffers, booleans,
date objects, error objects, maps, numbers, Object
objects, regexes,
sets, strings, symbols, and typed arrays. Object
objects are compared
by their own, not inherited, enumerable properties. Functions and DOM
nodes are not supported.
The value to compare.
The other value to compare.
Returns true
if the values are equivalent, else false
.
This method is like _.isEqual
except that it accepts customizer
which is
invoked to compare values. If customizer
returns undefined
comparisons are
handled by the method instead. The customizer
is invoked with up to seven arguments:
(objValue, othValue [, index|key, object, other, stack]).
The value to compare.
The other value to compare.
Returns true
if the values are equivalent, else false
.
Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, or URIError object.
The value to check.
Returns true if value is an error object, else false.
Checks if value is a finite primitive number.
Note: This method is based on Number.isFinite.
The value to check.
Returns true if value is a finite number, else false.
Checks if value is classified as a Function object.
The value to check.
Returns true if value is correctly classified, else false.
Checks if value
is an integer.
Note: This method is based on Number.isInteger
.
The value to check.
Returns true
if value
is an integer, else false
.
Checks if value
is a valid array-like length.
Note: This function is loosely based on ToLength
.
The value to check.
Returns true
if value
is a valid length, else false
.
Performs a deep comparison between object
and source
to determine if
object
contains equivalent property values.
Note: This method supports comparing the same values as _.isEqual
.
The object to inspect.
The object of property values to match.
Returns true
if object
is a match, else false
.
This method is like _.isMatch
except that it accepts customizer
which
is invoked to compare values. If customizer
returns undefined
comparisons
are handled by the method instead. The customizer
is invoked with three
arguments: (objValue, srcValue, index|key, object, source).
The object to inspect.
The object of property values to match.
Returns true
if object
is a match, else false
.
Checks if value is NaN.
Note: This method is not the same as isNaN which returns true for undefined and other non-numeric values.
The value to check.
Returns true if value is NaN, else false.
Checks if value is a native function.
The value to check.
Checks if value
is null
or undefined
.
The value to check.
Returns true
if value
is nullish, else false
.
Checks if value is null.
The value to check.
Returns true if value is null, else false.
Checks if value is classified as a Number primitive or object.
Note: To exclude Infinity, -Infinity, and NaN, which are classified as numbers, use the _.isFinite method.
The value to check.
Returns true if value is correctly classified, else false.
Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, new Number(0), and new String(''))
The value to check.
Returns true if value is an object, else false.
Checks if value
is object-like. A value is object-like if it's not null
and has a typeof
result of "object".
The value to check.
Returns true
if value
is object-like, else false
.
Checks if value is a plain object, that is, an object created by the Object constructor or one with a [[Prototype]] of null.
Note: This method assumes objects created by the Object constructor have no inherited enumerable properties.
The value to check.
Returns true if value is a plain object, else false.
Checks if value is classified as a RegExp object.
The value to check.
Returns true if value is correctly classified, else false.
Checks if value
is a safe integer. An integer is safe if it's an IEEE-754
double precision number which isn't the result of a rounded unsafe integer.
Note: This method is based on Number.isSafeInteger
.
The value to check.
Returns true
if value
is a safe integer, else false
.
Checks if value is classified as a String primitive or object.
The value to check.
Returns true if value is correctly classified, else false.
Checks if value
is classified as a Symbol
primitive or object.
The value to check.
Returns true
if value
is correctly classified, else false
.
Checks if value is classified as a typed array.
The value to check.
Returns true if value is correctly classified, else false.
Checks if value is undefined.
The value to check.
Returns true if value is undefined, else false.
Creates a function that invokes func
with the arguments of the created
function. If func
is a property name the created callback returns the
property value for a given element. If func
is an object the created
callback returns true
for elements that contain the equivalent object properties, otherwise it returns false
.
Returns the callback.
Converts all elements in array
into a string separated by separator
.
The array to convert.
The element separator.
Returns the joined string.
Converts string to kebab case.
The string to convert.
Returns the kebab cased string.
Creates an object composed of keys generated from the results of running each element of collection through iteratee. The corresponding value of each key is the last element responsible for generating the key. The iteratee function is bound to thisArg and invoked with three arguments: (value, index|key, collection).
If a property name is provided for iteratee the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for iteratee the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The collection to iterate over.
The function invoked per iteration.
The this binding of iteratee.
Returns the composed aggregate object.
Creates an array of the own enumerable property names of object.
Note: Non-object values are coerced to objects. See the ES spec for more details.
The object to query.
Returns the array of property names.
Creates an array of the own and inherited enumerable property names of object.
Note: Non-object values are coerced to objects.
The object to query.
An array of property names.
Gets the last element of array.
The array to query.
Returns the last element of array.
This method is like _.indexOf except that it iterates over elements of array from right to left.
The array to search.
The value to search for.
The index to search from or true to perform a binary search on a sorted array.
Returns the index of the matched value, else -1.
Converts string
, as space separated words, to lower case.
The string to convert.
Returns the lower cased string.
Converts the first character of string
to lower case.
The string to convert.
Returns the converted string.
Checks if value is less than other.
The value to compare.
The other value to compare.
Returns true if value is less than other, else false.
Checks if value is less than or equal to other.
The value to compare.
The other value to compare.
Returns true if value is less than or equal to other, else false.
Creates an array of values by running each element in collection through iteratee. The iteratee is bound to thisArg and invoked with three arguments: (value, index|key, collection).
If a property name is provided for iteratee the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for iteratee the created _.matches style callback returns true for elements that have the properties of the given object, else false.
Many lodash methods are guarded to work as iteratees for methods like _.every, _.filter, _.map, _.mapValues, _.reject, and _.some.
The guarded methods are: ary, callback, chunk, clone, create, curry, curryRight, drop, dropRight, every, fill, flatten, invert, max, min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range, sample, some, sum, uniq, and words
The collection to iterate over.
The function invoked per iteration.
The this binding of iteratee.
Returns the new mapped array.
The opposite of _.mapValues; this method creates an object with the same values as object and keys generated by running each own enumerable property of object through iteratee.
The object to iterate over.
The function invoked per iteration.
The this binding of iteratee.
Returns the new mapped object.
Creates an object with the same keys as object and values generated by running each own enumerable property of object through iteratee. The iteratee function is bound to thisArg and invoked with three arguments: (value, key, object).
If a property name is provided iteratee the created "_.property" style callback returns the property value of the given element.
If a value is also provided for thisArg the creted "_.matchesProperty" style callback returns true for elements that have a matching property value, else false;.
If an object is provided for iteratee the created "_.matches" style callback returns true for elements that have the properties of the given object, else false.
Returns the new mapped object.
Creates a function that performs a deep comparison between a given object and source, returning true if the given object has equivalent property values, else false.
Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and strings. Objects are compared by their own, not inherited, enumerable properties. For comparing a single own or inherited property value see _.matchesProperty.
The object of property values to match.
Returns the new function.
Creates a function that compares the property value of path on a given object to value.
Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and strings. Objects are compared by their own, not inherited, enumerable properties.
The path of the property to get.
The value to match.
Returns the new function.
Computes the maximum value of array
. If array
is empty or falsey
undefined
is returned.
Returns the maximum value.
This method is like _.max
except that it accepts iteratee
which is
invoked for each element in array
to generate the criterion by which
the value is ranked. The iteratee is invoked with one argument: (value).
Returns the maximum value.
Computes the mean of the values in array
.
Returns the mean.
Recursively merges own and inherited enumerable properties of source
objects into the destination object, skipping source properties that resolve
to undefined
. Array and plain object properties are merged recursively.
Other objects and value types are overridden by assignment. Source objects
are applied from left to right. Subsequent sources overwrite property
assignments of previous sources.
Note: This method mutates object
.
The destination object.
Returns object
.
This method is like _.merge
except that it accepts customizer
which
is invoked to produce the merged values of the destination and source
properties. If customizer
returns undefined
merging is handled by the
method instead. The customizer
is invoked with seven arguments:
(objValue, srcValue, key, object, source, stack).
The destination object.
The function to customize assigned values.
Returns object
.
Creates a function that invokes the method at path on a given object. Any additional arguments are provided to the invoked method.
The path of the method to invoke.
The arguments to invoke the method with.
Returns the new function.
The opposite of _.method; this method creates a function that invokes the method at a given path on object. Any additional arguments are provided to the invoked method.
The object to query.
The arguments to invoke the method with.
Returns the new function.
Computes the minimum value of array
. If array
is empty or falsey
undefined
is returned.
Returns the minimum value.
This method is like _.min
except that it accepts iteratee
which is
invoked for each element in array
to generate the criterion by which
the value is ranked. The iteratee is invoked with one argument: (value).
Returns the minimum value.
Adds all own enumerable function properties of a source object to the destination object. If object is a function then methods are added to its prototype as well.
Note: Use _.runInContext to create a pristine lodash function to avoid conflicts caused by modifying the original.
The destination object.
The object of functions to add.
The options object.
Returns object.
Creates a function that negates the result of the predicate func. The func predicate is invoked with the this binding and arguments of the created function.
The predicate to negate.
Returns the new function.
Reverts the _ variable to its previous value and returns a reference to the lodash function.
Returns the lodash function.
A no-operation function that returns undefined regardless of the arguments it receives.
undefined
Gets the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC).
The number of milliseconds.
Creates a function that returns its nth argument.
The index of the argument to return.
Returns the new function.
The opposite of _.pick
; this method creates an object composed of the
own and inherited enumerable properties of object
that are not omitted.
The source object.
Returns the new object.
The opposite of _.pickBy
; this method creates an object composed of the
own and inherited enumerable properties of object
that predicate
doesn't return truthy for.
The source object.
Returns the new object.
Creates a function that is restricted to invoking func once. Repeat calls to the function return the value of the first call. The func is invoked with the this binding and arguments of the created function.
The function to restrict.
Returns the new restricted function.
This method is like _.sortBy
except that it allows specifying the sort
orders of the iteratees to sort by. If orders
is unspecified, all values
are sorted in ascending order. Otherwise, specify an order of "desc" for
descending or "asc" for ascending sort order of corresponding values.
The collection to iterate over.
Returns the new sorted array.
Creates a function that invokes iteratees with the arguments provided to the created function and returns their results.
The iteratees to invoke.
Returns the new function.
Creates a function that runs each argument through a corresponding transform function.
The function to wrap.
The functions to transform arguments, specified as individual functions or arrays of functions.
Returns the new function.
Creates a function that checks if all of the predicates return truthy when invoked with the arguments provided to the created function.
The predicates to check.
Returns the new function.
Creates a function that checks if any of the predicates return truthy when invoked with the arguments provided to the created function.
The predicates to check.
Returns the new function.
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.
The string to pad.
The padding length.
The string used as padding.
Returns the padded string.
Pads string on the right side if it’s shorter than length. Padding characters are truncated if they exceed length.
The string to pad.
The padding length.
The string used as padding.
Returns the padded string.
Pads string on the left side if it’s shorter than length. Padding characters are truncated if they exceed length.
The string to pad.
The padding length.
The string used as padding.
Returns the padded string.
Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used unless value is a hexadecimal, in which case a radix of 16 is used.
Note: This method aligns with the ES5 implementation of parseInt.
The string to convert.
The radix to interpret value by.
Returns the converted integer.
Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for, while the second of which contains elements predicate returns falsey for. The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection).
If a property name is provided for predicate the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for predicate the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The collection to iterate over.
The function called per iteration.
The this binding of predicate.
Returns the array of grouped elements.
Creates an object composed of the picked object
properties.
The source object.
Returns the new object.
Creates an object composed of the object
properties predicate
returns
truthy for. The predicate is invoked with one argument: (value).
The source object.
Returns the new object.
Creates a function that returns the property value at path on a given object.
The path of the property to get.
Returns the new function.
The opposite of _.property; this method creates a function that returns the property value at a given path on object.
The object to query.
Returns the new function.
Removes all provided values from array using SameValueZero for equality comparisons.
Note: Unlike _.without, this method mutates array.
The array to modify.
The values to remove.
Returns array.
This method is like _.pull
except that it accepts an array of values to remove.
Note: Unlike _.difference
, this method mutates array
.
The array to modify.
The values to remove.
Returns array
.
This method is like _.pullAll
except that it accepts iteratee
which is
invoked for each element of array
and values
to to generate the criterion
by which uniqueness is computed. The iteratee is invoked with one argument: (value).
Note: Unlike _.differenceBy
, this method mutates array
.
The array to modify.
The values to remove.
Returns array
.
Removes elements from array corresponding to the given indexes and returns an array of the removed elements. Indexes may be specified as an array of indexes or as individual arguments.
Note: Unlike _.at, this method mutates array.
The array to modify.
The indexes of elements to remove, specified as individual indexes or arrays of indexes.
Returns the new array of removed elements.
Produces a random number between min and max (inclusive). If only one argument is provided a number between 0 and the given number is returned. If floating is true, or either min or max are floats, a floating-point number is returned instead of an integer.
The minimum possible value.
The maximum possible value.
Specify returning a floating-point number.
Returns the random number.
Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end. If end is not specified it’s set to start with start then set to 0. If end is less than start a zero-length range is created unless a negative step is specified.
The start of the range.
The end of the range.
The value to increment or decrement by.
Returns a new range array.
This method is like _.range
except that it populates values in
descending order.
The end of the range.
Returns the new array of numbers.
Creates a function that invokes func with arguments arranged according to the specified indexes 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.
The function to rearrange arguments for.
The arranged argument indexes, specified as individual indexes or arrays of indexes.
Returns the new function.
Reduces a collection to a value which is the accumulated result of running each element in the collection through the callback, where each successive callback execution consumes the return value of the previous execution. If accumulator is not provided the first element of the collection will be used as the initial accumulator value. The callback is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection).
The collection to iterate over.
The function called per iteration.
Initial value of the accumulator.
The this binding of callback.
Returns the accumulated value.
This method is like _.reduce except that it iterates over elements of a collection from right to left.
The collection to iterate over.
The function called per iteration.
Initial value of the accumulator.
The this binding of callback.
The accumulated value.
The opposite of _.filter; this method returns the elements of collection that predicate does not return truthy for.
The collection to iterate over.
The function invoked per iteration.
The this binding of predicate.
Returns the new filtered array.
Removes all elements from array that predicate returns truthy for and returns an array of the removed elements. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
If a property name is provided for predicate the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for predicate the created _.matches style callback returns true for elements that have the properties of the given object, else false.
Note: Unlike _.filter, this method mutates array.
The array to modify.
The function invoked per iteration.
The this binding of predicate.
Returns the new array of removed elements.
Repeats the given string n times.
The string to repeat.
The number of times to repeat the string.
Returns the repeated string.
Replaces matches for pattern in string with replacement.
Note: This method is based on String#replace.
Returns the modified string.
Creates a function that invokes func with the this binding of the created function and arguments from start and beyond provided as an array.
Note: This method is based on the rest parameter.
The function to apply a rest parameter to.
The start position of the rest parameter.
Returns the new function.
This method is like _.get except that if the resolved value is a function it’s invoked with the this binding of its parent object and its result is returned.
The object to query.
The path of the property to resolve.
The value returned if the resolved value is undefined.
Returns the resolved value.
Reverses array
so that the first element becomes the last, the second
element becomes the second to last, and so on.
Note: This method mutates array
and is based on
Array#reverse
.
Returns array
.
Calculates n rounded to precision.
The number to round.
The precision to round to.
Returns the rounded number.
Create a new pristine lodash function using the given context object.
The context object.
Returns a new lodash function.
Gets a random element from collection
.
The collection to sample.
Returns the random element.
Gets n
random elements from collection
.
The collection to sample.
Returns the random elements.
Sets the value at path of object. If a portion of path doesn’t exist it’s created. Arrays are created for missing index properties while objects are created for all other missing properties. Use _.setWith to customize path creation.
The object to modify.
The path of the property to set.
The value to set.
Returns object.
This method is like _.set except that it accepts customizer which is invoked to produce the objects of path. If customizer returns undefined path creation is handled by the method instead. The customizer is invoked with three arguments: (nsValue, key, nsObject).
The object to modify.
The path of the property to set.
The value to set.
Returns object.
Creates an array of shuffled values, using a version of the Fisher-Yates shuffle.
The collection to shuffle.
Returns the new shuffled array.
Gets the size of collection by returning its length for array-like values or the number of own enumerable properties for objects.
The collection to inspect.
Returns the size of collection.
Creates a slice of array from start up to, but not including, end.
The array to slice.
The start position.
The end position.
Returns the slice of array.
Converts string to snake case.
The string to convert.
Returns the snake cased string.
Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate returns truthy. The predicate is invoked with three arguments: (value, index|key, collection).
The collection to iterate over.
The function invoked per iteration.
Returns true if any element passes the predicate check, else false.
Creates an array of elements, sorted in ascending order by the results of running each element in a collection through each iteratee. This method performs a stable sort, that is, it preserves the original sort order of equal elements. The iteratees are invoked with one argument: (value).
The collection to iterate over.
Returns the new sorted array.
Uses a binary search to determine the lowest index at which value
should
be inserted into array
in order to maintain its sort order.
The sorted array to inspect.
The value to evaluate.
Returns the index at which value
should be inserted into array
.
This method is like _.sortedIndex
except that it accepts iteratee
which is invoked for value
and each element of array
to compute their
sort ranking. The iteratee is invoked with one argument: (value).
The sorted array to inspect.
The value to evaluate.
Returns the index at which value
should be inserted into array
.
This method is like _.indexOf
except that it performs a binary
search on a sorted array
.
The array to search.
The value to search for.
Returns the index of the matched value, else -1
.
This method is like _.sortedIndex
except that it returns the highest
index at which value
should be inserted into array
in order to
maintain its sort order.
The sorted array to inspect.
The value to evaluate.
Returns the index at which value
should be inserted into array
.
This method is like _.sortedLastIndex
except that it accepts iteratee
which is invoked for value
and each element of array
to compute their
sort ranking. The iteratee is invoked with one argument: (value).
The sorted array to inspect.
The value to evaluate.
Returns the index at which value
should be inserted into array
.
This method is like _.lastIndexOf
except that it performs a binary
search on a sorted array
.
The array to search.
Returns the index of the matched value, else -1
.
This method is like _.uniqBy
except that it's designed and optimized
for sorted arrays.
The array to inspect.
Returns the new duplicate free array.
Splits string by separator.
Note: This method is based on String#split.
Returns the new array of string segments.
Creates a function that invokes func with the this binding of the created function and an array of arguments much like Function#apply.
Note: This method is based on the spread operator.
The function to spread arguments over.
Returns the new function.
Converts string to start case.
The string to convert.
Returns the start cased string.
Checks if string starts with the given target string.
The string to search.
The string to search for.
The position to search from.
Returns true if string starts with target, else false.
Subtract two numbers.
The first number in a subtraction.
The second number in a subtraction.
Returns the difference.
Computes the sum of the values in array
.
Returns the sum.
This method is like _.sum
except that it accepts iteratee
which is
invoked for each element in array
to generate the value to be summed.
The iteratee is invoked with one argument: (value).
Returns the sum.
Creates a slice of array with n elements taken from the beginning.
The array to query.
The number of elements to take.
Returns the slice of array.
Creates a slice of array with n elements taken from the end.
The array to query.
The number of elements to take.
Returns the slice of array.
Creates a slice of array with elements taken from the end. Elements are taken until predicate returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
If a property name is provided for predicate the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for predicate the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The array to query.
The function invoked per iteration.
The this binding of predicate.
Returns the slice of array.
Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
If a property name is provided for predicate the created _.property style callback returns the property value of the given element.
If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
If an object is provided for predicate the created _.matches style callback returns true for elements that have the properties of the given object, else false.
The array to query.
The function invoked per iteration.
The this binding of predicate.
Returns the slice of array.
This method invokes interceptor and returns value. The interceptor is bound to thisArg and invoked with one argument; (value). The purpose of this method is to "tap into" a method chain in order to perform operations on intermediate results within the chain.
The value to provide to interceptor.
The function to invoke.
Returns value.
Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data properties may be accessed as free variables in the template. If a setting object is provided it takes precedence over _.templateSettings values.
Note: In the development build _.template utilizes sourceURLs for easier debugging.
For more information on precompiling templates see lodash's custom builds documentation.
For more information on Chrome extension sandboxes see Chrome's extensions documentation.
The template string.
The options object.
Returns the compiled template function.
Creates a throttled function that only invokes func at most once per every wait milliseconds. The throttled function comes with a cancel method to cancel delayed invocations. Provide an options object to indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled function return the result of the last func call.
Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only if the the throttled function is invoked more than once during the wait timeout.
The function to throttle.
The number of milliseconds to throttle invocations to.
The options object.
Returns the new throttled function.
This method is like _.tap except that it returns the result of interceptor.
The value to provide to interceptor.
The function to invoke.
The this binding of interceptor.
Returns the result of interceptor.
Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee is invoked with one argument; (index).
The number of times to invoke iteratee.
The function invoked per iteration.
Returns the array of results.
Converts value to an array.
The value to convert.
Returns the converted array.
Converts value
to an integer.
Note: This function is loosely based on ToInteger
.
The value to convert.
Returns the converted integer.
Converts value
to an integer suitable for use as the length of an
array-like object.
Note: This method is based on ToLength
.
The value to convert.
Returns the converted integer.
Converts string
, as a whole, to lower case.
The string to convert.
Returns the lower cased string.
Converts value
to a number.
The value to process.
Returns the number.
Creates an array of own enumerable key-value pairs for object.
The object to query.
Returns the new array of key-value pairs.
Creates an array of own and inherited enumerable key-value pairs for object.
The object to query.
Returns the new array of key-value pairs.
Converts value
to a property path array.
The value to convert.
Returns the new property path array.
Converts value to a plain object flattening inherited enumerable properties of value to own properties of the plain object.
The value to convert.
Returns the converted plain object.
Converts value
to a safe integer. A safe integer can be compared and
represented correctly.
The value to convert.
Returns the converted integer.
Converts value
to a string if it's not one. An empty string is returned
for null
and undefined
values. The sign of -0
is preserved.
The value to process.
Returns the string.
Converts string
, as a whole, to upper case.
The string to convert.
Returns the upper cased string.
An alternative to _.reduce; this method transforms object to a new accumulator object which is the result of running each of its own enumerable properties through iteratee, with each invocation potentially mutating the accumulator object. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, key, object). Iteratee functions may exit iteration early by explicitly returning false.
The object to iterate over.
The function invoked per iteration.
The custom accumulator value.
The this binding of iteratee.
Returns the accumulated value.
Removes leading and trailing whitespace or specified characters from string.
The string to trim.
The characters to trim.
Returns the trimmed string.
Removes trailing whitespace or specified characters from string.
The string to trim.
The characters to trim.
Returns the trimmed string.
Removes leading whitespace or specified characters from string.
The string to trim.
The characters to trim.
Returns the trimmed string.
Truncates string if it’s longer than the given maximum string length. The last characters of the truncated string are replaced with the omission string which defaults to "…".
The string to truncate.
The options object or maximum string length.
Returns the truncated string.
Creates a function that accepts up to one argument, ignoring any additional arguments.
The function to cap arguments for.
Returns the new function.
The inverse of _.escape; this method converts the HTML entities &, <, >, ", ', and ` in string to their corresponding characters.
Note: No other HTML entities are unescaped. To unescape additional HTML entities use a third-party library like he.
The string to unescape.
Returns the unescaped string.
Creates an array of unique values, in order, from all of the provided arrays using SameValueZero for equality comparisons.
The arrays to inspect.
Returns the new array of combined values.
This method is like _.union
except that it accepts iteratee
which is
invoked for each element of each arrays
to generate the criterion by which
uniqueness is computed. The iteratee is invoked with one argument: (value).
The arrays to inspect.
The iteratee invoked per element.
Returns the new array of combined values.
This method is like _.union
except that it accepts comparator
which
is invoked to compare elements of arrays
. The comparator is invoked
with two arguments: (arrVal, othVal).
Returns the new array of combined values.
Creates a duplicate-free version of an array, using
SameValueZero
for equality comparisons, in which only the first occurrence of each element
is kept.
The array to inspect.
Returns the new duplicate free array.
This method is like _.uniq
except that it accepts iteratee
which is
invoked for each element in array
to generate the criterion by which
uniqueness is computed. The iteratee is invoked with one argument: (value).
The array to inspect.
Returns the new duplicate free array.
This method is like _.uniq
except that it accepts comparator
which
is invoked to compare elements of array
. The comparator is invoked with
two arguments: (arrVal, othVal).
The array to inspect.
Returns the new duplicate free array.
Generates a unique ID. If prefix is provided the ID is appended to it.
The value to prefix the ID with.
Returns the unique ID.
Removes the property at path of object.
Note: This method mutates object.
The object to modify.
The path of the property to unset.
Returns true if the property is deleted, else false.
This method is like _.zip except that it accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
Returns the new array of regrouped elements.
This method is like _.unzip except that it accepts an iteratee to specify how regrouped values should be combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index, group).
The array of grouped elements to process.
The function to combine regrouped values.
The this binding of iteratee.
Returns the new array of regrouped elements.
Converts string
, as space separated words, to upper case.
The string to convert.
Returns the upper cased string.
Converts the first character of string
to upper case.
The string to convert.
Returns the converted string.
Creates an array of the own enumerable property values of object.
The object to query.
Returns an array of property values.
Creates an array of the own and inherited enumerable property values of object.
The object to query.
Returns the array of property values.
Creates an array excluding all provided values using SameValueZero for equality comparisons.
The array to filter.
The values to exclude.
Returns the new array of filtered values.
Splits string
into an array of its words.
The string to inspect.
The pattern to match words.
Returns the words of string
.
Creates a function that provides value to the wrapper function as its first argument. Any additional arguments provided to the function are appended to those provided to the wrapper function. The wrapper is invoked with the this binding of the created function.
The value to wrap.
The wrapper function.
Returns the new function.
Creates an array of unique values that is the symmetric difference of the provided arrays.
The arrays to inspect.
Returns the new array of values.
This method is like _.xor
except that it accepts iteratee
which is
invoked for each element of each arrays
to generate the criterion by which
uniqueness is computed. The iteratee is invoked with one argument: (value).
Returns the new array of values.
This method is like _.xor
except that it accepts comparator
which is
invoked to compare elements of arrays
. The comparator is invoked with
two arguments: (arrVal, othVal).
Returns the new array of values.
Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on.
The arrays to process.
Returns the new array of grouped elements.
The inverse of _.pairs; this method returns an object composed from arrays of property names and values. Provide either a single two dimensional array, e.g. [[key1, value1], [key2, value2]] or two arrays, one of property names and one of corresponding values.
The property names.
The property values.
Returns the new object.
This method is like _.zip except that it accepts an iteratee to specify how grouped values should be combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index, group).
Returns the new array of grouped elements.
Array * Chain * Collection * Date * Functions * Lang * Math * Number * Object * String * Utility *