mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Bump to v3.2.0.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
var baseSlice = require('./baseSlice'),
|
||||
isFunction = require('../lang/isFunction');
|
||||
var baseSlice = require('./baseSlice');
|
||||
|
||||
/** Used as the `TypeError` message for "Functions" methods. */
|
||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
@@ -15,7 +14,7 @@ var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
* @returns {number} Returns the timer id.
|
||||
*/
|
||||
function baseDelay(func, wait, args, fromIndex) {
|
||||
if (!isFunction(func)) {
|
||||
if (typeof func != 'function') {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
return setTimeout(function() { func.apply(undefined, baseSlice(args, fromIndex)); }, wait);
|
||||
|
||||
Reference in New Issue
Block a user