mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Remove setImmediate use from _.defer.
This commit is contained in:
17
dist/lodash.js
vendored
17
dist/lodash.js
vendored
@@ -76,7 +76,7 @@
|
||||
var contextProps = [
|
||||
'Array', 'Boolean', 'Date', 'Function', 'Math', 'Number', 'Object',
|
||||
'RegExp', 'String', '_', 'attachEvent', 'clearTimeout', 'isFinite', 'isNaN',
|
||||
'parseInt', 'setImmediate', 'setTimeout'
|
||||
'parseInt', 'setTimeout'
|
||||
];
|
||||
|
||||
/** Used to make template sourceURLs easier to identify */
|
||||
@@ -483,10 +483,6 @@
|
||||
setTimeout = context.setTimeout,
|
||||
splice = arrayRef.splice;
|
||||
|
||||
/** Used to detect `setImmediate` in Node.js */
|
||||
var setImmediate = typeof (setImmediate = freeGlobal && moduleExports && freeGlobal.setImmediate) == 'function' &&
|
||||
!reNative.test(setImmediate) && setImmediate;
|
||||
|
||||
/** Used to set meta data on functions */
|
||||
var defineProperty = (function() {
|
||||
// IE 8 only accepts DOM elements
|
||||
@@ -5480,15 +5476,6 @@
|
||||
var args = slice(arguments, 1);
|
||||
return setTimeout(function() { func.apply(undefined, args); }, 1);
|
||||
}
|
||||
// use `setImmediate` if available in Node.js
|
||||
if (setImmediate) {
|
||||
defer = function(func) {
|
||||
if (!isFunction(func)) {
|
||||
throw new TypeError;
|
||||
}
|
||||
return setImmediate.apply(context, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the `func` function after `wait` milliseconds. Additional arguments
|
||||
@@ -6446,7 +6433,7 @@
|
||||
* _(characters).chain()
|
||||
* .first()
|
||||
* .pick('age')
|
||||
* .value()
|
||||
* .value();
|
||||
* // => { 'age': 36 }
|
||||
*/
|
||||
function wrapperChain() {
|
||||
|
||||
Reference in New Issue
Block a user