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.
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.
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.
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 and a flush method to immediately invoke them. 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.
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 a function that invokes func
with arguments reversed.
The function to flip arguments for.
Returns the new function.
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.
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.
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 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.
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.
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.
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 and a flush method to immediately invoke them. 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.
Creates a function that accepts up to one argument, ignoring any additional arguments.
The function to cap arguments for.
Returns the new function.
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.
Generated using TypeDoc
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.
The function to bind.
The this binding of func.
The arguments to be partially applied.
Returns the new bound function.