Fix typos and rebuild docs & builds.

This commit is contained in:
John-David Dalton
2013-11-05 21:53:28 -08:00
parent 94ed21d1cf
commit 7bb86c4e2a
8 changed files with 100 additions and 81 deletions

View File

@@ -2314,9 +2314,7 @@
}
}
} else {
callback = (callback == null && isString(collection))
? charAtCallback
: createCallback(callback, thisArg, 3);
callback = createCallback(callback, thisArg, 3);
forEach(collection, function(value, index, collection) {
var current = callback(value, index, collection);
@@ -2389,9 +2387,7 @@
}
}
} else {
callback = (callback == null && isString(collection))
? charAtCallback
: createCallback(callback, thisArg, 3);
callback = createCallback(callback, thisArg, 3);
forEach(collection, function(value, index, collection) {
var current = callback(value, index, collection);
@@ -3870,6 +3866,7 @@
if (isCalled) {
lastCalled = now();
result = func.apply(thisArg, args);
args = thisArg = null;
}
} else {
timeoutId = setTimeout(delayed, remaining);
@@ -3884,6 +3881,7 @@
if (trailing || (maxWait !== wait)) {
lastCalled = now();
result = func.apply(thisArg, args);
args = thisArg = null;
}
};
@@ -3899,19 +3897,25 @@
if (!maxTimeoutId && !leading) {
lastCalled = stamp;
}
var remaining = maxWait - (stamp - lastCalled);
if (remaining <= 0) {
var remaining = maxWait - (stamp - lastCalled),
isCalled = remaining <= 0;
if (isCalled) {
if (maxTimeoutId) {
maxTimeoutId = clearTimeout(maxTimeoutId);
}
lastCalled = stamp;
result = func.apply(thisArg, args);
args = thisArg = null;
}
else if (!maxTimeoutId) {
maxTimeoutId = setTimeout(maxDelayed, remaining);
}
}
if (!timeoutId && wait !== maxWait) {
if (isCalled && timeoutId) {
timeoutId = clearTimeout(timeoutId);
}
else if (!timeoutId && wait !== maxWait) {
timeoutId = setTimeout(delayed, wait);
}
if (leadingCall) {