mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Add doc note to debounce and throttle about the arguments provided to the invoked func. [ci skip]
This commit is contained in:
15
lodash.js
15
lodash.js
@@ -8245,9 +8245,10 @@
|
|||||||
* milliseconds have elapsed since the last time the debounced function was
|
* milliseconds have elapsed since the last time the debounced function was
|
||||||
* invoked. The debounced function comes with a `cancel` method to cancel
|
* invoked. The debounced function comes with a `cancel` method to cancel
|
||||||
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
||||||
* Provide an options object to indicate that `func` should be invoked on the
|
* Provide an options object to indicate whether `func` should be invoked on
|
||||||
* leading and/or trailing edge of the `wait` timeout. Subsequent calls to the
|
* the leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
||||||
* debounced function return the result of the last `func` invocation.
|
* with the last arguments provided to the debounced function. 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
|
* **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
|
* on the trailing edge of the timeout only if the the debounced function is
|
||||||
@@ -8856,9 +8857,11 @@
|
|||||||
/**
|
/**
|
||||||
* Creates a throttled function that only invokes `func` at most once per
|
* Creates a throttled function that only invokes `func` at most once per
|
||||||
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
||||||
* method to cancel delayed invocations. Provide an options object to indicate
|
* method to cancel delayed `func` invocations and a `flush` method to
|
||||||
* that `func` should be invoked on the leading and/or trailing edge of the
|
* immediately invoke them. Provide an options object to indicate whether
|
||||||
* `wait` timeout. Subsequent calls to the throttled function return the
|
* `func` should be invoked on the leading and/or trailing edge of the `wait`
|
||||||
|
* timeout. The `func` is invoked with the last arguments provided to the
|
||||||
|
* throttled function. Subsequent calls to the throttled function return the
|
||||||
* result of the last `func` call.
|
* result of the last `func` call.
|
||||||
*
|
*
|
||||||
* **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
|
* **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
|
||||||
|
|||||||
Reference in New Issue
Block a user