Rebuild docs and dist.

This commit is contained in:
John-David Dalton
2014-02-22 18:06:40 -08:00
parent c4e31e7a58
commit 8e1f7c8d6f
8 changed files with 352 additions and 302 deletions

69
dist/lodash.js vendored
View File

@@ -1052,9 +1052,12 @@
* @returns {Array} Returns a new array of filtered values.
*/
function baseDifference(array, values) {
var length = array ? array.length : 0;
if (!length) {
return [];
}
var index = -1,
indexOf = getIndexOf(),
length = array ? array.length : 0,
result = [];
if (createCache && values && indexOf === baseIndexOf && values.length >= LARGE_ARRAY_SIZE) {
@@ -1220,7 +1223,6 @@
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
// used to indicate that when comparing objects, `a` has at least the properties of `b`
if (callback) {
var result = callback(a, b);
if (typeof result != 'undefined') {
@@ -1236,16 +1238,10 @@
otherType = typeof b;
// exit early for unlike primitive values
if (a === a &&
!(a && (type == 'function' || type == 'object')) &&
!(b && (otherType == 'function' || otherType == 'object'))) {
if (a === a && (a == null || b == null ||
(type != 'function' && type != 'object' && otherType != 'function' && otherType != 'object'))) {
return false;
}
// exit early for `null` and `undefined` avoiding ES3's Function#call behavior
// http://es5.github.io/#x15.3.4.4
if (a == null || b == null) {
return a === b;
}
// compare [[Class]] names
var className = toString.call(a),
otherClass = toString.call(b);
@@ -1270,7 +1266,7 @@
// treat `NaN` vs. `NaN` as equal
return (a != +a)
? b != +b
// but treat `+0` vs. `-0` as not equal
// but treat `-0` vs. `+0` as not equal
: (a == 0 ? (1 / a == 1 / b) : a == +b);
case regexpClass:
@@ -1467,9 +1463,12 @@
* @returns {Array} Returns a duplicate-value-free array.
*/
function baseUniq(array, isSorted, callback) {
var length = array ? array.length : 0;
if (!length) {
return [];
}
var index = -1,
indexOf = getIndexOf(),
length = array ? array.length : 0,
isLarge = createCache && !isSorted && indexOf === baseIndexOf && length >= LARGE_ARRAY_SIZE,
result = [];
@@ -2121,9 +2120,12 @@
* // => ['hoppy', 'baby puss', 'dino']
*/
function flatten(array, isShallow, callback, thisArg) {
var type = typeof isShallow;
var length = array ? array.length : 0;
if (!length) {
return [];
}
// juggle arguments
var type = typeof isShallow;
if (type != 'boolean' && isShallow != null) {
thisArg = callback;
callback = isShallow;
@@ -2727,8 +2729,8 @@
while (low < high) {
var mid = (low + high) >>> 1;
(callback(array[mid]) < value)
? low = mid + 1
: high = mid;
? (low = mid + 1)
: (high = mid);
}
return low;
}
@@ -2799,9 +2801,12 @@
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
function uniq(array, isSorted, callback, thisArg) {
var type = typeof isSorted;
var length = array ? array.length : 0;
if (!length) {
return [];
}
// juggle arguments
var type = typeof isSorted;
if (type != 'boolean' && isSorted != null) {
thisArg = callback;
callback = isSorted;
@@ -3575,7 +3580,7 @@
* _.indexBy(keys, function(key) { return String.fromCharCode(key.code); });
* // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
*
* _.indexBy(characters, function(key) { this.fromCharCode(key.code); }, String);
* _.indexBy(keys, function(key) { return this.fromCharCode(key.code); }, String);
* // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
*/
var indexBy = createAggregator(function(result, value, key) {
@@ -5093,7 +5098,8 @@
callback = null;
}
}
return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1));
callback = typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1);
return baseClone(value, isDeep, callback);
}
/**
@@ -5139,7 +5145,8 @@
* // => false
*/
function cloneDeep(value, callback, thisArg) {
return baseClone(value, true, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1));
callback = typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1);
return baseClone(value, true, callback);
}
/**
@@ -5721,7 +5728,24 @@
* // => true
*/
function isEqual(a, b, callback, thisArg) {
return baseIsEqual(a, b, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2));
callback = typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2);
if (!callback) {
// exit early for identical values
if (a === b) {
// treat `-0` vs. `+0` as not equal
return a !== 0 || (1 / a == 1 / b);
}
var type = typeof a,
otherType = typeof b;
// exit early for unlike primitive values
if (a === a && (a == null || b == null ||
(type != 'function' && type != 'object' && otherType != 'function' && otherType != 'object'))) {
return false;
}
}
return baseIsEqual(a, b, callback);
}
/**
@@ -6791,6 +6815,7 @@
if (!hasOwnProperty.call(object, key)) {
return false;
}
// treat `-0` vs. `+0` as not equal
var b = object[key];
return a === b && (a !== 0 || (1 / a == 1 / b));
};