Rebuild dist.

This commit is contained in:
John-David Dalton
2014-03-23 15:00:02 -07:00
parent e5c397203e
commit 8179a3a349
6 changed files with 154 additions and 132 deletions

137
dist/lodash.compat.js vendored
View File

@@ -1136,8 +1136,8 @@
stackB.push(result);
// recursively populate clone (susceptible to call stack limits)
(isArr ? baseEach : baseForOwn)(value, function(objValue, key) {
result[key] = baseClone(objValue, isDeep, callback, stackA, stackB);
(isArr ? baseEach : baseForOwn)(value, function(valValue, key) {
result[key] = baseClone(valValue, isDeep, callback, stackA, stackB);
});
return result;
@@ -1558,84 +1558,97 @@
* @param {Array} [stackB=[]] Tracks traversed `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
function baseIsEqual(value, other, callback, isWhere, stackA, stackB) {
if (callback) {
var result = callback(a, b);
var result = callback(value, other);
if (typeof result != 'undefined') {
return !!result;
}
}
// exit early for identical values
if (a === b) {
if (value === other) {
// treat `+0` vs. `-0` as not equal
return a !== 0 || (1 / a == 1 / b);
return value !== 0 || (1 / value == 1 / other);
}
var type = typeof a,
otherType = typeof b;
var valType = typeof value,
othType = typeof other;
// exit early for unlike primitive values
if (a === a && (a == null || b == null ||
(type != 'function' && type != 'object' && otherType != 'function' && otherType != 'object'))) {
if (value === value && (value == null || other == null ||
(valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object'))) {
return false;
}
// compare [[Class]] names
var className = toString.call(a),
otherClass = toString.call(b);
var valClass = toString.call(value),
othClass = toString.call(other),
valIsArg = valClass == argsClass,
othIsArg = othClass == argsClass;
if (className == argsClass) {
className = objectClass;
if (valIsArg) {
valClass = objectClass;
}
if (otherClass == argsClass) {
otherClass = objectClass;
if (othIsArg) {
othClass = objectClass;
}
if (className != otherClass) {
if (valClass != othClass) {
return false;
}
switch (className) {
switch (valClass) {
case boolClass:
case dateClass:
// coerce dates and booleans to numbers, dates to milliseconds and booleans
// to `1` or `0` treating invalid dates coerced to `NaN` as not equal
return +a == +b;
return +value == +other;
case numberClass:
// treat `NaN` vs. `NaN` as equal
return (a != +a)
? b != +b
return (value != +value)
? other != +other
// but treat `-0` vs. `+0` as not equal
: (a == 0 ? (1 / a == 1 / b) : a == +b);
: (value == 0 ? (1 / value == 1 / other) : value == +other);
case regexpClass:
case stringClass:
// coerce regexes to strings (http://es5.github.io/#x15.10.6.4)
// treat string primitives and their corresponding object instances as equal
return a == String(b);
return value == String(other);
}
var isArr = className == arrayClass;
var isArr = valClass == arrayClass;
if (!isArr) {
// unwrap any `lodash` wrapped values
var aWrapped = hasOwnProperty.call(a, '__wrapped__'),
bWrapped = hasOwnProperty.call(b, '__wrapped__');
var valWrapped = hasOwnProperty.call(value, '__wrapped__'),
othWrapped = hasOwnProperty.call(other, '__wrapped__');
if (aWrapped || bWrapped) {
return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB);
if (valWrapped || othWrapped) {
return baseIsEqual(valWrapped ? value.__wrapped__ : value, othWrapped ? other.__wrapped__ : other, callback, isWhere, stackA, stackB);
}
// exit for functions and DOM nodes
if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) {
if (valClass != objectClass || (!support.nodeClass && (isNode(value) || isNode(other)))) {
return false;
}
// in older versions of Opera, `arguments` objects have `Array` constructors
var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor,
ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor;
if (!support.argsObject) {
valIsArg = isArguments(value);
othIsArg = isArguments(other);
}
var hasValCtor = !valIsArg && hasOwnProperty.call(value, 'constructor'),
hasOthCtor = !othIsArg && hasOwnProperty.call(other, 'constructor');
// non `Object` object instances with different constructors are not equal
if (ctorA != ctorB &&
!(hasOwnProperty.call(a, 'constructor') && hasOwnProperty.call(b, 'constructor')) &&
!(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) &&
('constructor' in a && 'constructor' in b)
) {
if (hasValCtor != hasOthCtor) {
return false;
}
if (!hasValCtor) {
// in older versions of Opera, `arguments` objects have `Array` constructors
var valCtor = valIsArg ? Object : value.constructor,
othCtor = othIsArg ? Object : other.constructor;
// non `Object` object instances with different constructors are not equal
if (valCtor != othCtor &&
!(isFunction(valCtor) && valCtor instanceof valCtor && isFunction(othCtor) && othCtor instanceof othCtor) &&
('constructor' in value && 'constructor' in other)
) {
return false;
}
}
}
// assume cyclic structures are equal
// the algorithm for detecting cyclic structures is adapted from ES 5.1
@@ -1646,37 +1659,37 @@
var length = stackA.length;
while (length--) {
if (stackA[length] == a) {
return stackB[length] == b;
if (stackA[length] == value) {
return stackB[length] == other;
}
}
var size = 0;
result = true;
// add `a` and `b` to the stack of traversed objects
stackA.push(a);
stackB.push(b);
// add `value` and `other` to the stack of traversed objects
stackA.push(value);
stackB.push(other);
// recursively compare objects and arrays (susceptible to call stack limits)
if (isArr) {
// compare lengths to determine if a deep comparison is necessary
length = a.length;
size = b.length;
length = value.length;
size = other.length;
result = size == length;
if (result || isWhere) {
// deep compare the contents, ignoring non-numeric properties
while (size--) {
var index = length,
value = b[size];
othValue = other[size];
if (isWhere) {
while (index--) {
if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
if ((result = baseIsEqual(value[index], othValue, callback, isWhere, stackA, stackB))) {
break;
}
}
} else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
} else if (!(result = baseIsEqual(value[size], othValue, callback, isWhere, stackA, stackB))) {
break;
}
}
@@ -1685,20 +1698,20 @@
else {
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
// which, in this case, is more costly
baseForIn(b, function(value, key, b) {
if (hasOwnProperty.call(b, key)) {
baseForIn(other, function(othValue, key, other) {
if (hasOwnProperty.call(other, key)) {
// count the number of properties.
size++;
// deep compare each property value.
return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
return (result = hasOwnProperty.call(value, key) && baseIsEqual(value[key], othValue, callback, isWhere, stackA, stackB));
}
});
if (result && !isWhere) {
// ensure both objects have the same number of properties
baseForIn(a, function(value, key, a) {
if (hasOwnProperty.call(a, key)) {
// `size` will be `-1` if `a` has more properties than `b`
baseForIn(value, function(valValue, key, value) {
if (hasOwnProperty.call(value, key)) {
// `size` will be `-1` if `value` has more properties than `other`
return (result = --size > -1);
}
});
@@ -6142,7 +6155,7 @@
* var object = { 'name': 'fred' };
* var other = { 'name': 'fred' };
*
* object == other;
* object == other;
* // => false
*
* _.isEqual(object, other);
@@ -6165,12 +6178,12 @@
// treat `-0` vs. `+0` as not equal
return value !== 0 || (1 / value == 1 / other);
}
var vType = typeof value,
oType = typeof other;
var valType = typeof value,
othType = typeof other;
// exit early for unlike primitive values
if (value === value && (value == null || other == null ||
(vType != 'function' && vType != 'object' && oType != 'function' && oType != 'object'))) {
(valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object'))) {
return false;
}
}
@@ -6895,10 +6908,10 @@
* _.camelCase('Hello world');
* // => 'helloWorld'
*
* _.camelCase('hello-world');
* _.camelCase('--hello-world');
* // => 'helloWorld'
*
* _.camelCase('hello_world');
* _.camelCase('__hello_world__');
* // => 'helloWorld'
*/
var camelCase = createCompounder(function(result, word, index) {
@@ -7018,7 +7031,7 @@
* _.kebabCase('helloWorld');
* // => 'hello-world'
*
* _.kebabCase('hello_world');
* _.kebabCase('__hello_world__');
* // => 'hello-world'
*/
var kebabCase = createCompounder(function(result, word, index) {
@@ -7172,7 +7185,7 @@
* _.snakeCase('Hello world');
* // => 'hello_world'
*
* _.snakeCase('hello-world');
* _.snakeCase('--hello-world');
* // => 'hello_world'
*
* _.snakeCase('helloWorld');

View File

@@ -13,8 +13,8 @@
}var r=n[0],e=n[1],u=n[2],o=n[3],a=n[4],i=n[5],l=n[6],f=n[7],c=e&x,s=e&C,p=e&j,h=e&k,g=r;return Ee(t,n),t}function st(n,t){var u=n?n.length:0;if(!u)return[];var o=-1,a=Nt(),i=a===r,l=i&&Oe&&t&&200<=t.length,i=i&&!l,f=[],c=t?t.length:0;l&&(a=e,t=Oe(t));n:for(;++o<u;)if(l=n[o],i){for(var s=c;s--;)if(t[s]===l)continue n;f.push(l)}else 0>a(t,l)&&f.push(l);return f}function pt(n,t){var r=-1,e=n,u=n?n.length:0;if(typeof u=="number"&&-1<u&&u<=Zr)for(ke.unindexedChars&&dr(e)&&(e=e.split(""));++r<u&&false!==t(e[r],r,n););else wt(n,t);
return n}function ht(n,t){var r=n,e=n?n.length:0;if(typeof e=="number"&&-1<e&&e<=Zr)for(ke.unindexedChars&&dr(r)&&(r=r.split(""));e--&&false!==t(r[e],e,n););else xt(n,t);return n}function gt(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function vt(n,t,r,e){e=(+e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var a=n[e];if(a&&typeof a=="object"&&typeof a.length=="number"&&(Te(a)||pr(a))){t||(a=vt(a,t,r));var i=-1,l=a.length,f=o.length;for(o.length+=l;++i<l;)o[f++]=a[i]
}else r||o.push(a)}return o}function mt(n,t,r){var e=-1;r=r(n);for(var u=r.length;++e<u;){var o=r[e];if(false===t(n[o],o,n))break}return n}function dt(n,t,r){r=r(n);for(var e=r.length;e--;){var u=r[e];if(false===t(n[u],u,n))break}return n}function _t(n,t){mt(n,t,br)}function wt(n,t){return mt(n,t,We)}function xt(n,t){return dt(n,t,We)}function Ct(n,t,r,e,u,o){if(r){var a=r(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;var i=typeof n,l=typeof t;if(n===n&&(null==n||null==t||"function"!=i&&"object"!=i&&"function"!=l&&"object"!=l))return false;
if(l=Xr.call(n),i=Xr.call(t),l==J&&(l=ot),i==J&&(i=ot),l!=i)return false;switch(l){case nt:case tt:return+n==+t;case ut:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case at:case it:return n==Dr(t)}if(i=l==Q,!i){var f=te.call(n,"__wrapped__"),c=te.call(t,"__wrapped__");if(f||c)return Ct(f?n.__wrapped__:n,c?t.__wrapped__:t,r,e,u,o);if(l!=ot||!ke.nodeClass&&(h(n)||h(t)))return false;if(l=!ke.argsObject&&pr(n)?Pr:n.constructor,f=!ke.argsObject&&pr(t)?Pr:t.constructor,l!=f&&!(te.call(n,"constructor")&&te.call(t,"constructor")||gr(l)&&l instanceof l&&gr(f)&&f instanceof f)&&"constructor"in n&&"constructor"in t)return false
}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;var s=0,a=true;if(u.push(n),o.push(t),i){if(l=n.length,s=t.length,(a=s==l)||e)for(;s--;)if(i=l,f=t[s],e)for(;i--&&!(a=Ct(n[i],f,r,e,u,o)););else if(!(a=Ct(n[s],f,r,e,u,o)))break}else _t(t,function(t,i,l){return te.call(l,i)?(s++,a=te.call(n,i)&&Ct(n[i],t,r,e,u,o)):void 0}),a&&!e&&_t(n,function(n,t,r){return te.call(r,t)?a=-1<--s:void 0});return u.pop(),o.pop(),a}function jt(n,t,r,e,u){(Te(t)?pt:wt)(t,function(t,o){var a,i,l=t,f=n[o];
var f=Xr.call(n),i=Xr.call(t),c=f==J,l=i==J;if(c&&(f=ot),l&&(i=ot),f!=i)return false;switch(f){case nt:case tt:return+n==+t;case ut:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case at:case it:return n==Dr(t)}if(i=f==Q,!i){var s=te.call(n,"__wrapped__"),p=te.call(t,"__wrapped__");if(s||p)return Ct(s?n.__wrapped__:n,p?t.__wrapped__:t,r,e,u,o);if(f!=ot||!ke.nodeClass&&(h(n)||h(t)))return false;if(ke.argsObject||(c=pr(n),l=pr(t)),f=!c&&te.call(n,"constructor"),s=!l&&te.call(t,"constructor"),f!=s||!f&&(c=c?Pr:n.constructor,l=l?Pr:t.constructor,c!=l&&!(gr(c)&&c instanceof c&&gr(l)&&l instanceof l)&&"constructor"in n&&"constructor"in t))return false
}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;var g=0,a=true;if(u.push(n),o.push(t),i){if(l=n.length,g=t.length,(a=g==l)||e)for(;g--;)if(i=l,c=t[g],e)for(;i--&&!(a=Ct(n[i],c,r,e,u,o)););else if(!(a=Ct(n[g],c,r,e,u,o)))break}else _t(t,function(t,i,l){return te.call(l,i)?(g++,a=te.call(n,i)&&Ct(n[i],t,r,e,u,o)):void 0}),a&&!e&&_t(n,function(n,t,r){return te.call(r,t)?a=-1<--g:void 0});return u.pop(),o.pop(),a}function jt(n,t,r,e,u){(Te(t)?pt:wt)(t,function(t,o){var a,i,l=t,f=n[o];
if(t&&((i=Te(t))||Le(t))){for(l=e.length;l--;)if(a=e[l]==t){f=u[l];break}if(!a){var c;r&&(l=r(f,t),c=typeof l!="undefined")&&(f=l),c||(f=i?Te(f)?f:[]:Le(f)?f:{}),e.push(t),u.push(f),c||jt(f,t,r,e,u)}}else r&&(l=r(f,t),typeof l=="undefined"&&(l=t)),typeof l!="undefined"&&(f=l);n[o]=f})}function kt(n,t){return n+Jr(be()*(t-n+1))}function Ot(n,t,u){var o=n?n.length:0;if(!o)return[];var a=-1,i=Nt(),l=!t&&i===r,f=l&&Oe&&200<=o,l=l&&!f,c=[];if(f)var s=Oe(),i=e;else s=u&&!t?[]:c;n:for(;++a<o;){var p=n[a],h=u?u(p,a,n):p;
if(l){for(var g=s.length;g--;)if(s[g]===h)continue n;u&&s.push(h),c.push(p)}else t?a&&s===h||(s=h,c.push(p)):0>i(s,h)&&((u||f)&&s.push(h),c.push(p))}return c}function Et(n,t){for(var r=-1,e=t(n),u=e.length,o=Ir(u);++r<u;)o[r]=n[e[r]];return o}function At(n,t,r){for(var e=t.length,u=-1,o=ve(r.length-e,0),a=-1,i=n.length,l=Ir(o+i);++a<i;)l[a]=n[a];for(;++u<e;)l[t[u]]=r[u];for(;o--;)l[a++]=r[u++];return l}function St(n,t){return function(r,e,u){var a=t?[[],[]]:{};if(e=o.createCallback(e,u,3),Te(r)){u=-1;
for(var i=r.length;++u<i;){var l=r[u];n(a,l,e(l,u,r),r)}}else pt(r,function(t,r,u){n(a,t,e(t,r,u),u)});return a}}function It(n,t,r){return n=n.length,t|=0,n<t?(t-=n,r=null==r?" ":Dr(r),Cr(r,Gr(t/r.length)).slice(0,t)):""}function Rt(n,t,r,e,u,o,a,i){var l=t&x,f=t&C,s=t&O,p=t&E;if(!f&&!gr(n))throw new zr;s&&!u.length&&(t&=~O,s=u=false),p&&!o.length&&(t&=~E,p=o=false);var h=!f&&n[S];return h&&true!==h?(h=qt(h),h[4]&&(h[4]=qt(h[4])),h[5]&&(h[5]=qt(h[5])),typeof r=="number"&&(h[2]=r),n=h[1]&x,l&&!n&&(h[3]=e),!l&&n&&(t|=k),s&&(h[4]?re.apply(h[4],u):h[4]=u),p&&(h[5]?ie.apply(h[5],o):h[5]=o),h[1]|=t,Rt.apply(null,h)):(null==r?r=f?0:n.length:0>r&&(r=0),s&&(a=[]),p&&(i=[]),h=[n,t,r,e,u,o,a,i],t==x||t==(x|O)?c(h):X(h))

133
dist/lodash.js vendored
View File

@@ -979,8 +979,8 @@
stackB.push(result);
// recursively populate clone (susceptible to call stack limits)
(isArr ? baseEach : baseForOwn)(value, function(objValue, key) {
result[key] = baseClone(objValue, isDeep, callback, stackA, stackB);
(isArr ? baseEach : baseForOwn)(value, function(valValue, key) {
result[key] = baseClone(valValue, isDeep, callback, stackA, stackB);
});
return result;
@@ -1395,84 +1395,93 @@
* @param {Array} [stackB=[]] Tracks traversed `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
function baseIsEqual(value, other, callback, isWhere, stackA, stackB) {
if (callback) {
var result = callback(a, b);
var result = callback(value, other);
if (typeof result != 'undefined') {
return !!result;
}
}
// exit early for identical values
if (a === b) {
if (value === other) {
// treat `+0` vs. `-0` as not equal
return a !== 0 || (1 / a == 1 / b);
return value !== 0 || (1 / value == 1 / other);
}
var type = typeof a,
otherType = typeof b;
var valType = typeof value,
othType = typeof other;
// exit early for unlike primitive values
if (a === a && (a == null || b == null ||
(type != 'function' && type != 'object' && otherType != 'function' && otherType != 'object'))) {
if (value === value && (value == null || other == null ||
(valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object'))) {
return false;
}
// compare [[Class]] names
var className = toString.call(a),
otherClass = toString.call(b);
var valClass = toString.call(value),
othClass = toString.call(other),
valIsArg = valClass == argsClass,
othIsArg = othClass == argsClass;
if (className == argsClass) {
className = objectClass;
if (valIsArg) {
valClass = objectClass;
}
if (otherClass == argsClass) {
otherClass = objectClass;
if (othIsArg) {
othClass = objectClass;
}
if (className != otherClass) {
if (valClass != othClass) {
return false;
}
switch (className) {
switch (valClass) {
case boolClass:
case dateClass:
// coerce dates and booleans to numbers, dates to milliseconds and booleans
// to `1` or `0` treating invalid dates coerced to `NaN` as not equal
return +a == +b;
return +value == +other;
case numberClass:
// treat `NaN` vs. `NaN` as equal
return (a != +a)
? b != +b
return (value != +value)
? other != +other
// but treat `-0` vs. `+0` as not equal
: (a == 0 ? (1 / a == 1 / b) : a == +b);
: (value == 0 ? (1 / value == 1 / other) : value == +other);
case regexpClass:
case stringClass:
// coerce regexes to strings (http://es5.github.io/#x15.10.6.4)
// treat string primitives and their corresponding object instances as equal
return a == String(b);
return value == String(other);
}
var isArr = className == arrayClass;
var isArr = valClass == arrayClass;
if (!isArr) {
// unwrap any `lodash` wrapped values
var aWrapped = hasOwnProperty.call(a, '__wrapped__'),
bWrapped = hasOwnProperty.call(b, '__wrapped__');
var valWrapped = hasOwnProperty.call(value, '__wrapped__'),
othWrapped = hasOwnProperty.call(other, '__wrapped__');
if (aWrapped || bWrapped) {
return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB);
if (valWrapped || othWrapped) {
return baseIsEqual(valWrapped ? value.__wrapped__ : value, othWrapped ? other.__wrapped__ : other, callback, isWhere, stackA, stackB);
}
// exit for functions and DOM nodes
if (className != objectClass) {
if (valClass != objectClass) {
return false;
}
// in older versions of Opera, `arguments` objects have `Array` constructors
var ctorA = a.constructor,
ctorB = b.constructor;
var hasValCtor = !valIsArg && hasOwnProperty.call(value, 'constructor'),
hasOthCtor = !othIsArg && hasOwnProperty.call(other, 'constructor');
// non `Object` object instances with different constructors are not equal
if (ctorA != ctorB &&
!(hasOwnProperty.call(a, 'constructor') && hasOwnProperty.call(b, 'constructor')) &&
!(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) &&
('constructor' in a && 'constructor' in b)
) {
if (hasValCtor != hasOthCtor) {
return false;
}
if (!hasValCtor) {
// in older versions of Opera, `arguments` objects have `Array` constructors
var valCtor = valIsArg ? Object : value.constructor,
othCtor = othIsArg ? Object : other.constructor;
// non `Object` object instances with different constructors are not equal
if (valCtor != othCtor &&
!(isFunction(valCtor) && valCtor instanceof valCtor && isFunction(othCtor) && othCtor instanceof othCtor) &&
('constructor' in value && 'constructor' in other)
) {
return false;
}
}
}
// assume cyclic structures are equal
// the algorithm for detecting cyclic structures is adapted from ES 5.1
@@ -1483,37 +1492,37 @@
var length = stackA.length;
while (length--) {
if (stackA[length] == a) {
return stackB[length] == b;
if (stackA[length] == value) {
return stackB[length] == other;
}
}
var size = 0;
result = true;
// add `a` and `b` to the stack of traversed objects
stackA.push(a);
stackB.push(b);
// add `value` and `other` to the stack of traversed objects
stackA.push(value);
stackB.push(other);
// recursively compare objects and arrays (susceptible to call stack limits)
if (isArr) {
// compare lengths to determine if a deep comparison is necessary
length = a.length;
size = b.length;
length = value.length;
size = other.length;
result = size == length;
if (result || isWhere) {
// deep compare the contents, ignoring non-numeric properties
while (size--) {
var index = length,
value = b[size];
othValue = other[size];
if (isWhere) {
while (index--) {
if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
if ((result = baseIsEqual(value[index], othValue, callback, isWhere, stackA, stackB))) {
break;
}
}
} else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
} else if (!(result = baseIsEqual(value[size], othValue, callback, isWhere, stackA, stackB))) {
break;
}
}
@@ -1522,20 +1531,20 @@
else {
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
// which, in this case, is more costly
baseForIn(b, function(value, key, b) {
if (hasOwnProperty.call(b, key)) {
baseForIn(other, function(othValue, key, other) {
if (hasOwnProperty.call(other, key)) {
// count the number of properties.
size++;
// deep compare each property value.
return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
return (result = hasOwnProperty.call(value, key) && baseIsEqual(value[key], othValue, callback, isWhere, stackA, stackB));
}
});
if (result && !isWhere) {
// ensure both objects have the same number of properties
baseForIn(a, function(value, key, a) {
if (hasOwnProperty.call(a, key)) {
// `size` will be `-1` if `a` has more properties than `b`
baseForIn(value, function(valValue, key, value) {
if (hasOwnProperty.call(value, key)) {
// `size` will be `-1` if `value` has more properties than `other`
return (result = --size > -1);
}
});
@@ -5958,7 +5967,7 @@
* var object = { 'name': 'fred' };
* var other = { 'name': 'fred' };
*
* object == other;
* object == other;
* // => false
*
* _.isEqual(object, other);
@@ -5981,12 +5990,12 @@
// treat `-0` vs. `+0` as not equal
return value !== 0 || (1 / value == 1 / other);
}
var vType = typeof value,
oType = typeof other;
var valType = typeof value,
othType = typeof other;
// exit early for unlike primitive values
if (value === value && (value == null || other == null ||
(vType != 'function' && vType != 'object' && oType != 'function' && oType != 'object'))) {
(valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object'))) {
return false;
}
}
@@ -6670,10 +6679,10 @@
* _.camelCase('Hello world');
* // => 'helloWorld'
*
* _.camelCase('hello-world');
* _.camelCase('--hello-world');
* // => 'helloWorld'
*
* _.camelCase('hello_world');
* _.camelCase('__hello_world__');
* // => 'helloWorld'
*/
var camelCase = createCompounder(function(result, word, index) {
@@ -6793,7 +6802,7 @@
* _.kebabCase('helloWorld');
* // => 'hello-world'
*
* _.kebabCase('hello_world');
* _.kebabCase('__hello_world__');
* // => 'hello-world'
*/
var kebabCase = createCompounder(function(result, word, index) {
@@ -6947,7 +6956,7 @@
* _.snakeCase('Hello world');
* // => 'hello_world'
*
* _.snakeCase('hello-world');
* _.snakeCase('--hello-world');
* // => 'hello_world'
*
* _.snakeCase('helloWorld');

6
dist/lodash.min.js vendored
View File

@@ -12,9 +12,9 @@
}}return rr(n,t)}function Z(n){function t(){for(var n=-1,v=arguments.length,y=Or(v);++n<v;)y[n]=arguments[n];if(i&&(y=jt(i,l,y)),a){for(var n=a,d=f,b=-1,_=d.length,k=-1,j=le(y.length-_,0),A=-1,I=n.length,E=Or(j+I);++k<j;)E[k]=y[k];for(j=k;++A<I;)E[j+A]=n[A];for(;++b<_;)E[j+d[b]]=y[k++];y=E}return s&&v<u?(e|=C,e&=~O,h||(e&=~(w|x)),v=le(0,u-v),Z([r,e,v,o,y,null,[]])):(v=c?o:this,p&&(r=v[g]),this instanceof t?(v=m(r.prototype),n=r.apply(v,y),pr(n)?n:v):r.apply(v,y))}var r=n[0],e=n[1],u=n[2],o=n[3],i=n[4],a=n[5],l=n[6],f=n[7],c=e&w,p=e&x,s=e&k,h=e&j,g=r;
return _e(t,n),t}function lt(n,t){var u=n?n.length:0;if(!u)return[];var o=-1,i=It(),a=i===r,l=a&&be&&t&&200<=t.length,a=a&&!l,f=[],c=t?t.length:0;l&&(i=e,t=be(t));n:for(;++o<u;)if(l=n[o],a){for(var p=c;p--;)if(t[p]===l)continue n;f.push(l)}else 0>i(t,l)&&f.push(l);return f}function ft(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number"&&-1<e&&e<=qr)for(;++r<e&&false!==t(n[r],r,n););else mt(n,t);return n}function ct(n,t){var r=n?n.length:0;if(typeof r=="number"&&-1<r&&r<=qr)for(;r--&&false!==t(n[r],r,n););else dt(n,t);
return n}function pt(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function st(n,t,r,e){e=(+e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(Oe(i)||lr(i))){t||(i=st(i,t,r));var a=-1,l=i.length,f=o.length;for(o.length+=l;++a<l;)o[f++]=i[a]}else r||o.push(i)}return o}function gt(n,t,r){var e=-1;r=r(n);for(var u=r.length;++e<u;){var o=r[e];if(false===t(n[o],o,n))break}return n}function vt(n,t,r){r=r(n);for(var e=r.length;e--;){var u=r[e];
if(false===t(n[u],u,n))break}return n}function mt(n,t){return gt(n,t,Ie)}function dt(n,t){return vt(n,t,Ie)}function bt(n,t,r,e,u,o){if(r){var i=r(n,t);if(typeof i!="undefined")return!!i}if(n===t)return 0!==n||1/n==1/t;var a=typeof n,l=typeof t;if(n===n&&(null==n||null==t||"function"!=a&&"object"!=a&&"function"!=l&&"object"!=l))return false;if(l=Ur.call(n),a=Ur.call(t),l==G&&(l=rt),a==G&&(a=rt),l!=a)return false;switch(l){case J:case Q:return+n==+t;case tt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case et:case ut:return n==Wr(t)
}if(a=l==H,!a){var f=Yr.call(n,"__wrapped__"),c=Yr.call(t,"__wrapped__");if(f||c)return bt(f?n.__wrapped__:n,c?t.__wrapped__:t,r,e,u,o);if(l!=rt)return false;if(l=n.constructor,f=t.constructor,l!=f&&!(Yr.call(n,"constructor")&&Yr.call(t,"constructor")||cr(l)&&l instanceof l&&cr(f)&&f instanceof f)&&"constructor"in n&&"constructor"in t)return false}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;var p=0,i=true;if(u.push(n),o.push(t),a){if(l=n.length,p=t.length,(i=p==l)||e)for(;p--;)if(a=l,f=t[p],e)for(;a--&&!(i=bt(n[a],f,r,e,u,o)););else if(!(i=bt(n[p],f,r,e,u,o)))break
}else gt(t,function(t,a,l){return Yr.call(l,a)?(p++,i=Yr.call(n,a)&&bt(n[a],t,r,e,u,o)):void 0},vr),i&&!e&&gt(n,function(n,t,r){return Yr.call(r,t)?i=-1<--p:void 0},vr);return u.pop(),o.pop(),i}function _t(n,t,r,e,u){(Oe(t)?ft:mt)(t,function(t,o){var i,a,l=t,f=n[o];if(t&&((a=Oe(t))||Ae(t))){for(l=e.length;l--;)if(i=e[l]==t){f=u[l];break}if(!i){var c;r&&(l=r(f,t),c=typeof l!="undefined")&&(f=l),c||(f=a?Oe(f)?f:[]:Ae(f)?f:{}),e.push(t),u.push(f),c||_t(f,t,r,e,u)}}else r&&(l=r(f,t),typeof l=="undefined"&&(l=t)),typeof l!="undefined"&&(f=l);
if(false===t(n[u],u,n))break}return n}function mt(n,t){return gt(n,t,Ie)}function dt(n,t){return vt(n,t,Ie)}function bt(n,t,r,e,u,o){if(r){var i=r(n,t);if(typeof i!="undefined")return!!i}if(n===t)return 0!==n||1/n==1/t;var a=typeof n,l=typeof t;if(n===n&&(null==n||null==t||"function"!=a&&"object"!=a&&"function"!=l&&"object"!=l))return false;var f=Ur.call(n),a=Ur.call(t),c=f==G,l=a==G;if(c&&(f=rt),l&&(a=rt),f!=a)return false;switch(f){case J:case Q:return+n==+t;case tt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;
case et:case ut:return n==Wr(t)}if(a=f==H,!a){var p=Yr.call(n,"__wrapped__"),s=Yr.call(t,"__wrapped__");if(p||s)return bt(p?n.__wrapped__:n,s?t.__wrapped__:t,r,e,u,o);if(f!=rt)return false;if(f=!c&&Yr.call(n,"constructor"),p=!l&&Yr.call(t,"constructor"),f!=p||!f&&(c=c?Sr:n.constructor,l=l?Sr:t.constructor,c!=l&&!(cr(c)&&c instanceof c&&cr(l)&&l instanceof l)&&"constructor"in n&&"constructor"in t))return false}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;var h=0,i=true;if(u.push(n),o.push(t),a){if(l=n.length,h=t.length,(i=h==l)||e)for(;h--;)if(a=l,c=t[h],e)for(;a--&&!(i=bt(n[a],c,r,e,u,o)););else if(!(i=bt(n[h],c,r,e,u,o)))break
}else gt(t,function(t,a,l){return Yr.call(l,a)?(h++,i=Yr.call(n,a)&&bt(n[a],t,r,e,u,o)):void 0},vr),i&&!e&&gt(n,function(n,t,r){return Yr.call(r,t)?i=-1<--h:void 0},vr);return u.pop(),o.pop(),i}function _t(n,t,r,e,u){(Oe(t)?ft:mt)(t,function(t,o){var i,a,l=t,f=n[o];if(t&&((a=Oe(t))||Ae(t))){for(l=e.length;l--;)if(i=e[l]==t){f=u[l];break}if(!i){var c;r&&(l=r(f,t),c=typeof l!="undefined")&&(f=l),c||(f=a?Oe(f)?f:[]:Ae(f)?f:{}),e.push(t),u.push(f),c||_t(f,t,r,e,u)}}else r&&(l=r(f,t),typeof l=="undefined"&&(l=t)),typeof l!="undefined"&&(f=l);
n[o]=f})}function wt(n,t){return n+Vr(se()*(t-n+1))}function xt(n,t,u){var o=n?n.length:0;if(!o)return[];var i=-1,a=It(),l=!t&&a===r,f=l&&be&&200<=o,l=l&&!f,c=[];if(f)var p=be(),a=e;else p=u&&!t?[]:c;n:for(;++i<o;){var s=n[i],h=u?u(s,i,n):s;if(l){for(var g=p.length;g--;)if(p[g]===h)continue n;u&&p.push(h),c.push(s)}else t?i&&p===h||(p=h,c.push(s)):0>a(p,h)&&((u||f)&&p.push(h),c.push(s))}return c}function kt(n,t){for(var r=-1,e=t(n),u=e.length,o=Or(u);++r<u;)o[r]=n[e[r]];return o}function jt(n,t,r){for(var e=t.length,u=-1,o=le(r.length-e,0),i=-1,a=n.length,l=Or(o+a);++i<a;)l[i]=n[i];
for(;++u<e;)l[t[u]]=r[u];for(;o--;)l[i++]=r[u++];return l}function Ct(n,t){return function(r,e,u){var i=t?[[],[]]:{};e=o.createCallback(e,u,3),u=-1;var a=r?r.length:0;if(typeof a=="number"&&-1<a&&a<=qr)for(;++u<a;){var l=r[u];n(i,l,e(l,u,r),r)}else ft(r,function(t,r,u){n(i,t,e(t,r,u),u)});return i}}function Ot(n,t,r){return n=n.length,t|=0,n<t?(t-=n,r=null==r?" ":Wr(r),br(r,Kr(t/r.length)).slice(0,t)):""}function At(n,t,r,e,u,o,i,a){var l=t&w,f=t&x,p=t&C,s=t&O;if(!f&&!cr(n))throw new Fr;p&&!u.length&&(t&=~C,p=u=false),s&&!o.length&&(t&=~O,s=o=false);
var h=!f&&n[I];return h&&true!==h?(h=Lt(h),h[4]&&(h[4]=Lt(h[4])),h[5]&&(h[5]=Lt(h[5])),typeof r=="number"&&(h[2]=r),n=h[1]&w,l&&!n&&(h[3]=e),!l&&n&&(t|=j),p&&(h[4]?Gr.apply(h[4],u):h[4]=u),s&&(h[5]?ne.apply(h[5],o):h[5]=o),h[1]|=t,At.apply(null,h)):(null==r?r=f?0:n.length:0>r&&(r=0),p&&(i=[]),s&&(a=[]),h=[n,t,r,e,u,o,i,a],t==w||t==(w|C)?c(h):Z(h))}function It(){var n=(n=o.indexOf)===Wt?r:n;return n}function Et(n){return typeof n=="function"&&Pr.test(Zr.call(n))}function Rt(n){var t,r;return n&&Ur.call(n)==rt&&(Yr.call(n,"constructor")||(t=n.constructor,!cr(t)||t instanceof t))?(gt(n,function(n,t){r=t

View File

@@ -822,7 +822,7 @@
var hasValCtor = hasOwnProperty.call(value, 'constructor'),
hasOthCtor = hasOwnProperty.call(other, 'constructor');
if (hasValCtor !== hasOthCtor) {
if (hasValCtor != hasOthCtor) {
return false;
}
if (!hasValCtor) {
@@ -4005,7 +4005,7 @@
* var object = { 'name': 'fred' };
* var other = { 'name': 'fred' };
*
* object == other;
* object == other;
* // => false
*
* _.isEqual(object, other);

View File

@@ -7,7 +7,7 @@
if(typeof r=="undefined"||!("prototype"in n))return n;switch(t){case 1:return function(t){return n.call(r,t)};case 2:return function(t,e){return n.call(r,t,e)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return z(n,r)}function c(n){function r(){for(var n=-1,a=arguments.length,c=Array(a);++n<a;)c[n]=arguments[n];if(u){for(var n=u,a=o,l=a.length,p=-1,s=Qr(c.length-l,0),h=-1,g=n.length,v=Array(s+g);++h<g;)v[h]=n[h];for(;++p<l;)v[a[p]]=c[p];
for(;s--;)v[h++]=c[p++];c=v}return n=i?e:this,this instanceof r?(n=f(t.prototype),a=t.apply(n,c),K(a)?a:n):t.apply(n,c)}var t=n[0],e=n[3],u=n[4],o=n[6],i=n[1]&ir;return r}function l(n,r){var t=n?n.length:0;if(!t)return[];for(var e=-1,u=d(),o=[];++e<t;){var i=n[e];0>u(r,i)&&o.push(i)}return o}function p(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number"&&-1<e&&e<=Rr)for(;++t<e&&r(n[t],t,n)!==ar;);else v(n,r,ct);return n}function s(n,r){var t=n?n.length:0;if(typeof t=="number"&&-1<t&&t<=Rr)for(;t--&&r(n[t],t,n)!==ar;);else for(var t=ct(n),e=t.length;e--;){var u=t[e];
if(r(n[u],u,n)===ar)break}return n}function h(n,r,t,e){var u;return t(n,function(n,t,o){return r(n,t,o)?(u=e?t:n,ar):void 0}),u}function g(n,r,t,e){e=(+e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(at(i)||H(i))){r||(i=g(i,r,t));var f=-1,a=i.length,c=o.length;for(o.length+=a;++f<a;)o[c++]=i[f]}else t||o.push(i)}return o}function v(n,r,t){var e=-1;t=t(n);for(var u=t.length;++e<u;){var o=t[e];if(r(n[o],o,n)===ar)break}return n}function y(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;
var u=typeof n,i=typeof r;if(n===n&&(null==n||null==r||"function"!=u&&"object"!=u&&"function"!=i&&"object"!=i))return false;if(i=$r.call(n),u=$r.call(r),i!=u)return false;switch(i){case mr:case _r:return+n==+r;case br:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case wr:case jr:return n==r+""}if(u=i==yr,!u){var f=n instanceof o,a=r instanceof o;if(f||a)return y(f?n.__wrapped__:n,a?r.__wrapped__:r,t,e);if(i!=dr)return false;if(i=Cr.call(n,"constructor"),f=Cr.call(r,"constructor"),i!==f||!i&&(i=n.constructor,f=r.constructor,i!=f&&!(J(i)&&i instanceof i&&J(f)&&f instanceof f)&&"constructor"in n&&"constructor"in r))return false
var u=typeof n,i=typeof r;if(n===n&&(null==n||null==r||"function"!=u&&"object"!=u&&"function"!=i&&"object"!=i))return false;if(i=$r.call(n),u=$r.call(r),i!=u)return false;switch(i){case mr:case _r:return+n==+r;case br:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case wr:case jr:return n==r+""}if(u=i==yr,!u){var f=n instanceof o,a=r instanceof o;if(f||a)return y(f?n.__wrapped__:n,a?r.__wrapped__:r,t,e);if(i!=dr)return false;if(i=Cr.call(n,"constructor"),f=Cr.call(r,"constructor"),i!=f||!i&&(i=n.constructor,f=r.constructor,i!=f&&!(J(i)&&i instanceof i&&J(f)&&f instanceof f)&&"constructor"in n&&"constructor"in r))return false
}for(t||(t=[]),e||(e=[]),i=t.length;i--;)if(t[i]==n)return e[i]==r;var c=true,l=0;if(t.push(n),e.push(r),u){if(l=r.length,c=l==n.length)for(;l--&&(c=y(n[l],r[l],t,e)););}else v(r,function(r,u,o){return Cr.call(o,u)?(l++,!(c=Cr.call(n,u)&&y(n[u],r,t,e))&&ar):void 0},X),c&&v(n,function(n,r,t){return Cr.call(t,r)?!(c=-1<--l)&&ar:void 0},X);return t.pop(),e.pop(),c}function m(n,r,t){var e=n?n.length:0;if(!e)return[];for(var u=-1,o=d(),i=[],f=t&&!r?[]:i;++u<e;){var a=n[u],c=t?t(a,u,n):a;r?u&&f===c||(f=c,i.push(a)):0>o(f,c)&&(t&&f.push(c),i.push(a))
}return i}function _(n,r){return function(t,e,u){var o=r?[[],[]]:{};e=nr(e,u,3),u=-1;var i=t?t.length:0;if(typeof i=="number"&&-1<i&&i<=Rr)for(;++u<i;){var f=t[u];n(o,f,e(f,u,t),t)}else p(t,function(r,t,u){n(o,r,e(r,t,u),u)});return o}}function b(n,r,t,e,u,i,f,a){var l=r&fr;if(!J(n))throw new TypeError;if(l&&!u.length&&(r&=~fr,l=u=false),l){f=u;for(var l=-1,p=f.length,s=[];++l<p;)f[l]===o&&s.push(l);f=s}return c([n,r,t,e,u,i,f,a])}function d(){var r=(r=o.indexOf)===A?n:r;return r}function w(n){return typeof n=="function"&&Ir.test(zr.call(n))
}function j(n){for(var r=-1,t=X(n),e=t.length,u=[];++r<e;){var o=t[r];Cr.call(n,o)&&u.push(o)}return u}function x(n,r,t){return null==r||t?n?n[0]:or:E(n,0,0>r?0:r)}function A(r,t,e){var u=r?r.length:0;if(typeof e=="number")e=0>e?Qr(0,u+e):e||0;else if(e)return e=O(r,t),u&&r[e]===t?e:-1;return n(r,t,e)}function T(n,r,t){return E(n,null==r||t?1:0>r?0:r)}function E(n,r,t){var e=-1,u=n?n.length:0;for(r=+r||0,0>r?r=Qr(u+r,0):r>u&&(r=u),t=typeof t=="undefined"?u:+t||0,0>t?t=Qr(u+t,0):t>u&&(t=u),u=r>t?0:t-r,t=Array(u);++e<u;)t[e]=n[r+e];