Rebuild lodash and docs.

This commit is contained in:
jdalton
2015-02-23 08:02:12 -08:00
parent 5ef9a4be8a
commit a35ab3937a
4 changed files with 257 additions and 250 deletions

View File

@@ -1,9 +1,9 @@
/**
* @license
* lodash 3.3.0 (Custom Build) <https://lodash.com/>
* lodash 3.3.1 (Custom Build) <https://lodash.com/>
* Build: `lodash modern -o ./lodash.js`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
@@ -13,7 +13,7 @@
var undefined;
/** Used as the semantic version number. */
var VERSION = '3.3.0';
var VERSION = '3.3.1';
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
@@ -1804,7 +1804,7 @@
var index = -1,
indexOf = getIndexOf(),
isCommon = indexOf == baseIndexOf,
cache = isCommon && values.length >= 200 && createCache(values),
cache = (isCommon && values.length >= 200) ? createCache(values) : null,
valuesLength = values.length;
if (cache) {
@@ -2624,7 +2624,7 @@
length = array.length,
isCommon = indexOf == baseIndexOf,
isLarge = isCommon && length >= 200,
seen = isLarge && createCache(),
seen = isLarge ? createCache() : null,
result = [];
if (seen) {
@@ -3676,8 +3676,11 @@
} else {
prereq = type == 'string' && index in object;
}
var other = object[index];
return prereq && (value === value ? value === other : other !== other);
if (prereq) {
var other = object[index];
return value === value ? value === other : other !== other;
}
return false;
}
/**
@@ -4403,7 +4406,7 @@
* // => 2
*
* // using the `_.matches` callback shorthand
* _.findLastIndex(users, { user': 'barney', 'active': true });
* _.findLastIndex(users, { 'user': 'barney', 'active': true });
* // => 0
*
* // using the `_.matchesProperty` callback shorthand
@@ -4514,7 +4517,7 @@
* @example
*
* _.indexOf([1, 2, 1, 2], 2);
* // => 2
* // => 1
*
* // using `fromIndex`
* _.indexOf([1, 2, 1, 2], 2, 2);
@@ -4587,7 +4590,7 @@
var value = arguments[argsIndex];
if (isArray(value) || isArguments(value)) {
args.push(value);
caches.push(isCommon && value.length >= 120 && createCache(argsIndex && value));
caches.push((isCommon && value.length >= 120) ? createCache(argsIndex && value) : null);
}
}
argsLength = args.length;
@@ -6655,7 +6658,7 @@
* ];
*
* // using the `_.matches` callback shorthand
* _.some(users, { user': 'barney', 'active': false });
* _.some(users, { 'user': 'barney', 'active': false });
* // => false
*
* // using the `_.matchesProperty` callback shorthand
@@ -7191,7 +7194,7 @@
* @memberOf _
* @category Function
* @param {Function} func The function to debounce.
* @param {number} wait The number of milliseconds to delay.
* @param {number} [wait=0] The number of milliseconds to delay.
* @param {Object} [options] The options object.
* @param {boolean} [options.leading=false] Specify invoking on the leading
* edge of the timeout.
@@ -7249,7 +7252,7 @@
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
wait = wait < 0 ? 0 : wait;
wait = wait < 0 ? 0 : (+wait || 0);
if (options === true) {
var leading = true;
trailing = false;
@@ -7770,7 +7773,7 @@
* @memberOf _
* @category Function
* @param {Function} func The function to throttle.
* @param {number} wait The number of milliseconds to throttle invocations to.
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
* @param {Object} [options] The options object.
* @param {boolean} [options.leading=true] Specify invoking on the leading
* edge of the timeout.
@@ -10087,10 +10090,10 @@
* var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
* compiled.source;
* // => function(data) {
* var __t, __p = '';
* __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
* return __p;
* }
* // var __t, __p = '';
* // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
* // return __p;
* // }
*
* // using the `source` property to inline compiled templates for meaningful
* // line numbers in error messages and a stack trace
@@ -11204,15 +11207,13 @@
// Add `LazyWrapper` methods that accept an `iteratee` value.
arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
var isFilter = index == LAZY_FILTER_FLAG,
isWhile = index == LAZY_WHILE_FLAG;
var isFilter = index == LAZY_FILTER_FLAG || index == LAZY_WHILE_FLAG;
LazyWrapper.prototype[methodName] = function(iteratee, thisArg) {
var result = this.clone(),
filtered = result.__filtered__,
iteratees = result.__iteratees__ || (result.__iteratees__ = []);
result.__filtered__ = filtered || isFilter || (isWhile && result.__dir__ < 0);
result.__filtered__ = result.__filtered__ || isFilter;
iteratees.push({ 'iteratee': getCallback(iteratee, thisArg, 3), 'type': index });
return result;
};
@@ -11279,9 +11280,14 @@
};
LazyWrapper.prototype.dropWhile = function(predicate, thisArg) {
var done;
var done,
lastIndex,
isRight = this.__dir__ < 0;
predicate = getCallback(predicate, thisArg, 3);
return this.filter(function(value, index, array) {
done = done && (isRight ? index < lastIndex : index > lastIndex);
lastIndex = index;
return done || (done = !predicate(value, index, array));
});
};