Rebuild /dist files.

This commit is contained in:
John-David Dalton
2014-01-30 08:46:51 -08:00
parent 36a1bd9e0f
commit ba8684dfc7
6 changed files with 345 additions and 231 deletions

94
dist/lodash.js vendored
View File

@@ -1147,6 +1147,31 @@
return collection;
}
/**
* The base implementation of `_.forEachEach` without support for callback
* shorthands or `thisArg` binding.
*
* @private
* @param {Array|Object|string} collection The collection to iterate over.
* @param {Function} callback The function called per iteration.
* @returns {Array|Object|string} Returns `collection`.
*/
function baseEachRight(collection, callback) {
var iterable = collection,
length = collection ? collection.length : 0;
if (typeof length == 'number') {
while (length--) {
if (callback(iterable[length], length, collection) === false) {
break;
}
}
} else {
baseForOwnRight(collection, callback);
}
return collection;
}
/**
* The base implementation of `_.flatten` without support for callback
* shorthands or `thisArg` binding.
@@ -1210,6 +1235,28 @@
return object;
}
/**
* The base implementation of `_.forOwnRight` without support for callback
* shorthands or `thisArg` binding.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} callback The function called per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwnRight(object, callback) {
var props = keys(object),
length = props.length;
while (length--) {
var key = props[length];
if (callback(object[key], key, object) === false) {
break;
}
}
return object;
}
/**
* The base implementation of `_.isEqual`, without support for `thisArg` binding,
* that allows partial "_.where" style comparisons.
@@ -1520,8 +1567,8 @@
function createAggregator(setter) {
return function(collection, callback, thisArg) {
var result = {};
callback = lodash.createCallback(callback, thisArg, 3);
callback = lodash.createCallback(callback, thisArg, 3);
var index = -1,
length = collection ? collection.length : 0;
@@ -1933,6 +1980,7 @@
*/
function findLastIndex(array, callback, thisArg) {
var length = array ? array.length : 0;
callback = lodash.createCallback(callback, thisArg, 3);
while (length--) {
if (callback(array[length], length, array)) {
@@ -3179,8 +3227,8 @@
*/
function every(collection, callback, thisArg) {
var result = true;
callback = lodash.createCallback(callback, thisArg, 3);
callback = lodash.createCallback(callback, thisArg, 3);
var index = -1,
length = collection ? collection.length : 0;
@@ -3240,8 +3288,8 @@
*/
function filter(collection, callback, thisArg) {
var result = [];
callback = lodash.createCallback(callback, thisArg, 3);
callback = lodash.createCallback(callback, thisArg, 3);
var index = -1,
length = collection ? collection.length : 0;
@@ -3307,7 +3355,6 @@
*/
function find(collection, callback, thisArg) {
callback = lodash.createCallback(callback, thisArg, 3);
var index = -1,
length = collection ? collection.length : 0;
@@ -3352,8 +3399,9 @@
*/
function findLast(collection, callback, thisArg) {
var result;
callback = lodash.createCallback(callback, thisArg, 3);
forEachRight(collection, function(value, index, collection) {
baseEachRight(collection, function(value, index, collection) {
if (callback(value, index, collection)) {
result = value;
return false;
@@ -3424,6 +3472,7 @@
*/
function forEachRight(collection, callback, thisArg) {
var length = collection ? collection.length : 0;
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
if (typeof length == 'number') {
while (length--) {
@@ -3432,12 +3481,7 @@
}
}
} else {
var props = keys(collection);
length = props.length;
baseEach(collection, function(value, key, collection) {
key = props ? props[--length] : --length;
return callback(collection[key], key, collection);
});
baseEachRight(collection, callback);
}
return collection;
}
@@ -3827,8 +3871,8 @@
*/
function reduce(collection, callback, accumulator, thisArg) {
var noaccum = arguments.length < 3;
callback = lodash.createCallback(callback, thisArg, 4);
callback = lodash.createCallback(callback, thisArg, 4);
var index = -1,
length = collection ? collection.length : 0;
@@ -3870,8 +3914,9 @@
*/
function reduceRight(collection, callback, accumulator, thisArg) {
var noaccum = arguments.length < 3;
callback = lodash.createCallback(callback, thisArg, 4);
forEachRight(collection, function(value, index, collection) {
baseEachRight(collection, function(value, index, collection) {
accumulator = noaccum
? (noaccum = false, value)
: callback(accumulator, value, index, collection);
@@ -4052,8 +4097,8 @@
*/
function some(collection, callback, thisArg) {
var result;
callback = lodash.createCallback(callback, thisArg, 3);
callback = lodash.createCallback(callback, thisArg, 3);
var index = -1,
length = collection ? collection.length : 0;
@@ -4130,12 +4175,20 @@
callback = lodash.createCallback(callback, thisArg, 3);
}
baseEach(collection, function(value, key, collection) {
if (multi) {
var length = callback.length,
criteria = Array(length);
while (length--) {
criteria[length] = value[callback[length]];
}
} else {
criteria = callback(value, key, collection);
}
var object = result[++index] = getObject();
object.criteria = criteria;
object.index = index;
object.value = value;
object.criteria = multi
? map(callback, function(key) { return value[key]; })
: callback(value, key, collection);
});
length = result.length;
@@ -5156,6 +5209,7 @@
*/
function findKey(object, callback, thisArg) {
var result;
callback = lodash.createCallback(callback, thisArg, 3);
baseForOwn(object, function(value, key, object) {
if (callback(value, key, object)) {
@@ -5209,8 +5263,9 @@
*/
function findLastKey(object, callback, thisArg) {
var result;
callback = lodash.createCallback(callback, thisArg, 3);
forOwnRight(object, function(value, key, object) {
baseForOwnRight(object, function(value, key, object) {
if (callback(value, key, object)) {
result = key;
return false;
@@ -5285,7 +5340,6 @@
*/
function forInRight(object, callback, thisArg) {
var pairs = [];
baseForIn(object, function(value, key) {
pairs.push(key, value);
});
@@ -5912,8 +5966,8 @@
*/
function mapValues(object, callback, thisArg) {
var result = {};
callback = lodash.createCallback(callback, thisArg, 3);
callback = lodash.createCallback(callback, thisArg, 3);
baseForOwn(object, function(value, key, object) {
result[key] = callback(value, key, object);
});