mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Bump to v3.3.0.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
define([], function() {
|
||||
define(['./baseCreate', './baseLodash'], function(baseCreate, baseLodash) {
|
||||
|
||||
/** Used as references for `-Infinity` and `Infinity`. */
|
||||
var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
|
||||
@@ -20,5 +20,8 @@ define([], function() {
|
||||
this.__views__ = null;
|
||||
}
|
||||
|
||||
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
||||
LazyWrapper.prototype.constructor = LazyWrapper;
|
||||
|
||||
return LazyWrapper;
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
define([], function() {
|
||||
define(['./baseCreate', './baseLodash'], function(baseCreate, baseLodash) {
|
||||
|
||||
/**
|
||||
* The base constructor for creating `lodash` wrapper objects.
|
||||
@@ -14,5 +14,8 @@ define([], function() {
|
||||
this.__chain__ = !!chainAll;
|
||||
}
|
||||
|
||||
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
|
||||
LodashWrapper.prototype.constructor = LodashWrapper;
|
||||
|
||||
return LodashWrapper;
|
||||
});
|
||||
|
||||
18
internal/baseIsFunction.js
Normal file
18
internal/baseIsFunction.js
Normal file
@@ -0,0 +1,18 @@
|
||||
define([], function() {
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
return baseIsFunction;
|
||||
});
|
||||
13
internal/baseLodash.js
Normal file
13
internal/baseLodash.js
Normal file
@@ -0,0 +1,13 @@
|
||||
define([], function() {
|
||||
|
||||
/**
|
||||
* The function whose prototype all chaining wrappers inherit from.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function baseLodash() {
|
||||
// No operation performed.
|
||||
}
|
||||
|
||||
return baseLodash;
|
||||
});
|
||||
@@ -1,4 +1,4 @@
|
||||
define(['./arrayEach', './baseForOwn', './baseMergeDeep', '../lang/isArray', './isLength', './isObjectLike', '../lang/isTypedArray'], function(arrayEach, baseForOwn, baseMergeDeep, isArray, isLength, isObjectLike, isTypedArray) {
|
||||
define(['./arrayEach', './baseForOwn', './baseMergeDeep', '../lang/isArray', './isLength', '../lang/isObject', './isObjectLike', '../lang/isTypedArray'], function(arrayEach, baseForOwn, baseMergeDeep, isArray, isLength, isObject, isObjectLike, isTypedArray) {
|
||||
|
||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||
var undefined;
|
||||
@@ -16,8 +16,10 @@ define(['./arrayEach', './baseForOwn', './baseMergeDeep', '../lang/isArray', './
|
||||
* @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 = []);
|
||||
|
||||
@@ -20,7 +20,8 @@ define(['./isIndex', './isLength', '../lang/isObject'], function(isIndex, isLeng
|
||||
} else {
|
||||
prereq = type == 'string' && index in object;
|
||||
}
|
||||
return prereq && object[index] === value;
|
||||
var other = object[index];
|
||||
return prereq && (value === value ? value === other : other !== other);
|
||||
}
|
||||
|
||||
return isIterateeCall;
|
||||
|
||||
Reference in New Issue
Block a user