Bump to v3.10.0.

This commit is contained in:
jdalton
2015-06-14 22:21:58 -07:00
parent 6ee2b9a7b8
commit 4bd2890bbd
121 changed files with 777 additions and 649 deletions

View File

@@ -43,7 +43,7 @@ import matches from './matches';
*/
function callback(func, thisArg, guard) {
if (guard && isIterateeCall(func, thisArg, guard)) {
thisArg = null;
thisArg = undefined;
}
return isObjectLike(func)
? matches(func)

View File

@@ -1,15 +1,10 @@
import arrayCopy from '../internal/arrayCopy';
import arrayPush from '../internal/arrayPush';
import baseFunctions from '../internal/baseFunctions';
import isFunction from '../lang/isFunction';
import isObject from '../lang/isObject';
import keys from '../object/keys';
/** Used for native method references. */
var arrayProto = Array.prototype;
/** Native method references. */
var push = arrayProto.push;
/**
* Adds all own enumerable function properties of a source object to the
* destination object. If `object` is a function then methods are added to
@@ -76,9 +71,7 @@ function mixin(object, source, options) {
result.__chain__ = chainAll;
return result;
}
var args = [this.value()];
push.apply(args, arguments);
return func.apply(object, args);
return func.apply(object, arrayPush([this.value()], arguments));
};
}(func));
}

View File

@@ -1,10 +1,8 @@
import isIterateeCall from '../internal/isIterateeCall';
/** Native method references. */
var ceil = Math.ceil;
/* Native method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
var nativeCeil = Math.ceil,
nativeMax = Math.max;
/**
* Creates an array of numbers (positive and/or negative) progressing from
@@ -41,7 +39,7 @@ var nativeMax = Math.max;
*/
function range(start, end, step) {
if (step && isIterateeCall(start, end, step)) {
end = step = null;
end = step = undefined;
}
start = +start || 0;
step = step == null ? 1 : (+step || 0);
@@ -55,7 +53,7 @@ function range(start, end, step) {
// Use `Array(length)` so engines like Chakra and V8 avoid slower modes.
// See https://youtu.be/XAqIpGU8ZZk#t=17m25s for more details.
var index = -1,
length = nativeMax(ceil((end - start) / (step || 1)), 0),
length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
result = Array(length);
while (++index < length) {

View File

@@ -1,11 +1,9 @@
import bindCallback from '../internal/bindCallback';
import root from '../internal/root';
/** Native method references. */
var floor = Math.floor;
/* Native method references for those with the same name as other `lodash` methods. */
var nativeIsFinite = root.isFinite,
var nativeFloor = Math.floor,
nativeIsFinite = root.isFinite,
nativeMin = Math.min;
/** Used as references for the maximum length and index of an array. */
@@ -39,7 +37,7 @@ var MAX_ARRAY_LENGTH = 4294967295;
* // => also invokes `mage.castSpell(n)` three times
*/
function times(n, iteratee, thisArg) {
n = floor(n);
n = nativeFloor(n);
// Exit early to avoid a JSC JIT bug in Safari 8
// where `Array(0)` is treated as `Array(1)`.