Rebuild lodash and docs.

This commit is contained in:
John-David Dalton
2016-04-13 20:42:21 -07:00
parent a532773703
commit 391a930d49
10 changed files with 220 additions and 214 deletions

26
dist/lodash.js vendored
View File

@@ -1,6 +1,6 @@
/**
* @license
* lodash 4.11.0 (Custom Build) <https://lodash.com/>
* lodash 4.11.1 (Custom Build) <https://lodash.com/>
* Build: `lodash -o ./dist/lodash.js`
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
@@ -13,7 +13,7 @@
var undefined;
/** Used as the semantic version number. */
var VERSION = '4.11.0';
var VERSION = '4.11.1';
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
@@ -9373,12 +9373,13 @@
function debounce(func, wait, options) {
var lastArgs,
lastThis,
maxWait,
result,
timerId,
lastCallTime = 0,
lastInvokeTime = 0,
leading = false,
maxWait = false,
maxing = false,
trailing = true;
if (typeof func != 'function') {
@@ -9387,7 +9388,8 @@
wait = toNumber(wait) || 0;
if (isObject(options)) {
leading = !!options.leading;
maxWait = 'maxWait' in options && nativeMax(toNumber(options.maxWait) || 0, wait);
maxing = 'maxWait' in options;
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
@@ -9415,7 +9417,7 @@
timeSinceLastInvoke = time - lastInvokeTime,
result = wait - timeSinceLastCall;
return maxWait === false ? result : nativeMin(result, maxWait - timeSinceLastInvoke);
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
}
function shouldInvoke(time) {
@@ -9426,7 +9428,7 @@
// trailing edge, the system time has gone backwards and we're treating
// it as the trailing edge, or we've hit the `maxWait` limit.
return (!lastCallTime || (timeSinceLastCall >= wait) ||
(timeSinceLastCall < 0) || (maxWait !== false && timeSinceLastInvoke >= maxWait));
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
}
function timerExpired() {
@@ -9475,10 +9477,12 @@
if (timerId === undefined) {
return leadingEdge(lastCallTime);
}
// Handle invocations in a tight loop.
clearTimeout(timerId);
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
if (maxing) {
// Handle invocations in a tight loop.
clearTimeout(timerId);
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
if (timerId === undefined) {
timerId = setTimeout(timerExpired, wait);
@@ -14699,7 +14703,7 @@
object = this;
methodNames = baseFunctions(source, keys(source));
}
var chain = (isObject(options) && 'chain' in options) ? options.chain : true,
var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
isFunc = isFunction(object);
arrayEach(methodNames, function(methodName) {