Rebuild dist.

This commit is contained in:
John-David Dalton
2014-06-11 12:29:06 -07:00
parent 6ab04866ec
commit 3c5655fc3d
6 changed files with 309 additions and 311 deletions

133
dist/lodash.js vendored
View File

@@ -104,10 +104,11 @@
/** Used to assign default `context` object properties */
var contextProps = [
'Array', 'ArrayBuffer', 'Boolean', 'Date', 'Float64Array', 'Function',
'Math', 'Number', 'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout',
'document', 'isFinite', 'isNaN','parseInt', 'setTimeout', 'TypeError',
'Uint8Array', 'window', 'WinRTError'
'Array', 'ArrayBuffer', 'Boolean', 'Date', 'Float32Array', 'Float64Array',
'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number', 'Object',
'RegExp', 'Set', 'String', '_', 'clearTimeout', 'document', 'isFinite', 'isNaN',
'parseInt', 'setTimeout', 'TypeError', 'Uint8Array', 'Uint8ClampedArray',
'Uint16Array', 'Uint32Array', 'window', 'WinRTError'
];
/** Used to make template sourceURLs easier to identify */
@@ -633,7 +634,7 @@
/** Native method shortcuts */
var ArrayBuffer = isNative(ArrayBuffer = context.ArrayBuffer) && ArrayBuffer,
bufferSlice = isNative(bufferSlice = ArrayBuffer && (new ArrayBuffer).slice) && bufferSlice,
bufferSlice = isNative(bufferSlice = ArrayBuffer && new ArrayBuffer(0).slice) && bufferSlice,
ceil = Math.ceil,
clearTimeout = context.clearTimeout,
Float64Array = isNative(Float64Array = context.Float64Array) && Float64Array,
@@ -1082,7 +1083,7 @@
case float32Class: case float64Class:
case int8Class: case int16Class: case int32Class:
case uint8Class: case uint8ClampedClass: case uint16Class: case uint32Class:
return value.subarray(0);
return new Ctor(cloneBuffer(value.buffer));
case numberClass:
case stringClass:
@@ -1108,13 +1109,16 @@
return stackB[length];
}
}
result = isArr ? Ctor(value.length) : Ctor();
result = isArr ? Ctor(value.length) : new Ctor;
}
else {
result = isArr ? slice(value) : baseAssign({}, value);
}
if (className == argsClass) {
result.length = value.length;
}
// add array properties assigned by `RegExp#exec`
if (isArr) {
else if (isArr) {
if (hasOwnProperty.call(value, 'index')) {
result.index = value.index;
}
@@ -1182,8 +1186,7 @@
if (typeof func != 'function') {
return identity;
}
// exit early for no `thisArg` or already bound by `Function#bind`
if (typeof thisArg == 'undefined' || !('prototype' in func)) {
if (typeof thisArg == 'undefined') {
return func;
}
var data = func[expando];
@@ -1199,7 +1202,7 @@
}
if (!data) {
// checks if `func` references the `this` keyword and stores the result
data = reThis.test(source);
data = reThis.test(source) || isNative(func);
setData(func, data);
}
}
@@ -1598,8 +1601,8 @@
return false;
}
var valClass = toString.call(value),
othClass = toString.call(other),
valIsArg = valClass == argsClass,
othClass = toString.call(other),
othIsArg = othClass == argsClass;
if (valIsArg) {
@@ -1618,6 +1621,10 @@
// to `1` or `0` treating invalid dates coerced to `NaN` as not equal
return +value == +other;
case errorClass:
// check properties instead of coercing to strings to support IE < 8
return value.name === other.name && value.message === other.message;
case numberClass:
// treat `NaN` vs. `NaN` as equal
return (value != +value)
@@ -1625,12 +1632,10 @@
// but treat `-0` vs. `+0` as not equal
: (value == 0 ? (1 / value == 1 / other) : value == +other);
case errorClass:
case regexpClass:
case stringClass:
// coerce errors (http://es5.github.io/#x15.11.4.4)
// and regexes (http://es5.github.io/#x15.10.6.4) to strings
// treat string primitives and their corresponding object instances as equal
// coerce regexes to strings (http://es5.github.io/#x15.10.6.4)
// treat string primitives and object instances as equal
return value == String(other);
}
var isArr = arrayLikeClasses[valClass];
@@ -1678,7 +1683,7 @@
return stackB[length] == other;
}
}
result = true;
var index = -1;
// add `value` and `other` to the stack of traversed objects
stackA.push(value);
@@ -1686,32 +1691,28 @@
// recursively compare objects and arrays (susceptible to call stack limits)
if (isArr) {
// compare lengths to determine if a deep comparison is necessary
var othLength = other.length;
length = value.length;
result = othLength == length;
if (result || isWhere) {
var othIndex = -1;
result = length == othLength;
if (result || (isWhere && othLength > length)) {
// deep compare the contents, ignoring non-numeric properties
while (++othIndex < othLength) {
var othValue = other[othIndex];
while (++index < length) {
var valValue = value[index];
if (isWhere) {
var index = -1;
while (++index < length) {
result = baseIsEqual(value[index], othValue, callback, isWhere, stackA, stackB);
var othIndex = othLength;
while (othIndex--) {
result = baseIsEqual(valValue, other[othIndex], callback, isWhere, stackA, stackB);
if (result) {
break;
}
}
} else {
var valValue = value[othIndex];
result = callback ? callback(valValue, othValue, othIndex) : undefined;
result = typeof result == 'undefined'
? baseIsEqual(valValue, othValue, callback, isWhere, stackA, stackB)
: !!result;
var othValue = other[index];
result = callback ? callback(valValue, othValue, index) : undefined;
if (typeof result == 'undefined') {
result = baseIsEqual(valValue, othValue, callback, isWhere, stackA, stackB);
}
}
if (!result) {
break;
@@ -1720,42 +1721,40 @@
}
}
else {
var size = 0;
var valProps = keys(value),
othProps = keys(other);
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
// which, in this case, is more costly
baseForIn(other, function(othValue, key, other) {
if (hasOwnProperty.call(other, key)) {
result = false;
// count the number of properties
size++;
// deep compare each property value
if (hasOwnProperty.call(value, key)) {
var valValue = value[key];
if (valIsArg) {
valProps.push('length');
}
if (othIsArg) {
othProps.push('length');
}
length = valProps.length;
result = length == othProps.length;
if (result || isWhere) {
while (++index < length) {
var key = valProps[index];
result = hasOwnProperty.call(other, key);
if (result) {
valValue = value[key];
othValue = other[key];
result = callback ? callback(valValue, othValue, key) : undefined;
result = typeof result == 'undefined'
? baseIsEqual(valValue, othValue, callback, isWhere, stackA, stackB)
: !!result;
if (typeof result == 'undefined') {
result = baseIsEqual(valValue, othValue, callback, isWhere, stackA, stackB);
}
}
if (!result) {
break;
}
return result;
}
});
if (result && !isWhere) {
// ensure both objects have the same number of properties
baseForIn(value, function(valValue, key, value) {
if (hasOwnProperty.call(value, key)) {
// `size` will be `-1` if `value` has more properties than `other`
result = --size > -1;
return result;
}
});
}
}
stackA.pop();
stackB.pop();
return result;
return !!result;
}
/**
@@ -4890,8 +4889,8 @@
* @category Collections
* @param {Array|Object|string} collection The collection to iterate over.
* @param {Array|Function|Object|string} [callback=identity] The function
* called per iteration. If a property name or object is provided it is
* used to create a "_.pluck" or "_.where" style callback respectively.
* called per iteration. If property name(s) or an object is provided it
* is used to create a "_.pluck" or "_.where" style callback respectively.
* @param {*} [thisArg] The `this` binding of `callback`.
* @returns {Array} Returns the new sorted array.
* @example
@@ -7894,7 +7893,7 @@
var type = typeof func,
isFunc = type == 'function';
if (isFunc && (typeof thisArg == 'undefined' || !('prototype' in func))) {
if (isFunc && typeof thisArg == 'undefined') {
return func;
}
if (isFunc || func == null) {
@@ -7973,7 +7972,7 @@
while (length--) {
var key = props[length];
if (!(hasOwnProperty.call(object, key) &&
baseIsEqual(object[key], source[key], null, true))) {
baseIsEqual(source[key], object[key], null, true))) {
return false;
}
}
@@ -8658,9 +8657,9 @@
// some AMD build optimizers like r.js check for condition patterns like the following:
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
// Expose Lo-Dash to the global object even when an AMD loader is present in
// case Lo-Dash is loaded with a RequireJS shim config.
// See http://requirejs.org/docs/api.html#config-shim
// Expose Lo-Dash to the global object when an AMD loader is present to avoid
// errors in cases where Lo-Dash is loaded by a script tag and not intended
// as an AMD module. See http://requirejs.org/docs/errors.html#mismatch
root._ = _;
// define as an anonymous module so, through path mapping, it can be