mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Remove coercion method use.
This commit is contained in:
4
delay.js
4
delay.js
@@ -1,5 +1,3 @@
|
||||
import toNumber from './toNumber.js'
|
||||
|
||||
/**
|
||||
* Invokes `func` after `wait` milliseconds. Any additional arguments are
|
||||
* provided to `func` when it's invoked.
|
||||
@@ -19,7 +17,7 @@ function delay(func, wait, ...args) {
|
||||
if (typeof func != 'function') {
|
||||
throw new TypeError('Expected a function')
|
||||
}
|
||||
return setTimeout(func, toNumber(wait) || 0, ...args)
|
||||
return setTimeout(func, +wait || 0, ...args)
|
||||
}
|
||||
|
||||
export default delay
|
||||
|
||||
Reference in New Issue
Block a user