asyncThrottle
@twine-protocol/twine-core v0.1.0 • Docs
twine-js / @twine-protocol/twine-core / asyncThrottle
Function: asyncThrottle()
asyncThrottle<
T
>(fn
,delay
?): (...args
) =>Promise
<T
>
Throttle an async function call
Within the delay interval, the same promise is returned
Type Parameters
Type Parameter
T
Parameters
Parameter
Type
fn
(...x
) => Promise
<T
>
delay
?
number
Returns
Function
Parameters
Parameter
Type
...args
any
[]
Returns
Promise
<T
>
Defined in
Last updated