Bump to v3.3.0.

This commit is contained in:
jdalton
2015-02-20 00:57:26 -08:00
parent 05cb7419a6
commit 5dc85cc9a8
91 changed files with 830 additions and 408 deletions

View File

@@ -1,3 +1,6 @@
var baseCreate = require('./baseCreate'),
baseLodash = require('./baseLodash');
/** Used as references for `-Infinity` and `Infinity`. */
var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
@@ -18,4 +21,7 @@ function LazyWrapper(value) {
this.__views__ = null;
}
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
LazyWrapper.prototype.constructor = LazyWrapper;
module.exports = LazyWrapper;

View File

@@ -1,3 +1,6 @@
var baseCreate = require('./baseCreate'),
baseLodash = require('./baseLodash');
/**
* The base constructor for creating `lodash` wrapper objects.
*
@@ -12,4 +15,7 @@ function LodashWrapper(value, chainAll, actions) {
this.__chain__ = !!chainAll;
}
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
LodashWrapper.prototype.constructor = LodashWrapper;
module.exports = LodashWrapper;

View File

@@ -0,0 +1,15 @@
/**
* The base implementation of `_.isFunction` without support for environments
* with incorrect `typeof` results.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
*/
function baseIsFunction(value) {
// Avoid a Chakra JIT bug in compatibility modes of IE 11.
// See https://github.com/jashkenas/underscore/issues/1621 for more details.
return typeof value == 'function' || false;
}
module.exports = baseIsFunction;

10
internal/baseLodash.js Normal file
View File

@@ -0,0 +1,10 @@
/**
* The function whose prototype all chaining wrappers inherit from.
*
* @private
*/
function baseLodash() {
// No operation performed.
}
module.exports = baseLodash;

View File

@@ -3,6 +3,7 @@ var arrayEach = require('./arrayEach'),
baseMergeDeep = require('./baseMergeDeep'),
isArray = require('../lang/isArray'),
isLength = require('./isLength'),
isObject = require('../lang/isObject'),
isObjectLike = require('./isObjectLike'),
isTypedArray = require('../lang/isTypedArray');
@@ -19,8 +20,10 @@ var arrayEach = require('./arrayEach'),
* @returns {Object} Returns the destination object.
*/
function baseMerge(object, source, customizer, stackA, stackB) {
if (!isObject(object)) {
return object;
}
var isSrcArr = isLength(source.length) && (isArray(source) || isTypedArray(source));
(isSrcArr ? arrayEach : baseForOwn)(source, function(srcValue, key, source) {
if (isObjectLike(srcValue)) {
stackA || (stackA = []);

View File

@@ -22,7 +22,8 @@ function isIterateeCall(value, index, object) {
} else {
prereq = type == 'string' && index in object;
}
return prereq && object[index] === value;
var other = object[index];
return prereq && (value === value ? value === other : other !== other);
}
module.exports = isIterateeCall;