mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Use more ES2015.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/** Error message constants. */
|
||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
const FUNC_ERROR_TEXT = 'Expected a function';
|
||||
|
||||
/**
|
||||
* The base implementation of `_.delay` and `_.defer` which accepts `args`
|
||||
@@ -15,7 +15,7 @@ function baseDelay(func, wait, args) {
|
||||
if (typeof func != 'function') {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
return setTimeout(function() { func.apply(undefined, args); }, wait);
|
||||
return setTimeout(() => func.apply(undefined, args), wait);
|
||||
}
|
||||
|
||||
export default baseDelay;
|
||||
|
||||
Reference in New Issue
Block a user