Comparing version 4.0.0 to 4.0.1
@@ -32,3 +32,3 @@ import copyObjectWith from './internal/copyObjectWith'; | ||
*/ | ||
var assignInWith = createAssigner(function(object, source, customizer) { | ||
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { | ||
copyObjectWith(source, keysIn(source), object, customizer); | ||
@@ -35,0 +35,0 @@ }); |
@@ -31,3 +31,3 @@ import copyObjectWith from './internal/copyObjectWith'; | ||
*/ | ||
var assignWith = createAssigner(function(object, source, customizer) { | ||
var assignWith = createAssigner(function(object, source, srcIndex, customizer) { | ||
copyObjectWith(source, keys(source), object, customizer); | ||
@@ -34,0 +34,0 @@ }); |
@@ -20,3 +20,3 @@ import baseClone from './internal/baseClone'; | ||
* | ||
* var el = _.cloneDeep(document.body, customizer); | ||
* var el = _.cloneDeepWith(document.body, customizer); | ||
* | ||
@@ -23,0 +23,0 @@ * console.log(el === document.body); |
@@ -7,3 +7,3 @@ import baseClone from './internal/baseClone'; | ||
* cloning is handled by the method instead. The `customizer` is invoked with | ||
* up to five arguments; (value [, index|key, object, stack]). | ||
* up to four arguments; (value [, index|key, object, stack]). | ||
* | ||
@@ -24,3 +24,3 @@ * @static | ||
* | ||
* var el = _.clone(document.body, customizer); | ||
* var el = _.cloneWith(document.body, customizer); | ||
* | ||
@@ -27,0 +27,0 @@ * console.log(el === document.body); |
@@ -28,6 +28,9 @@ import arrayConcat from './internal/arrayConcat'; | ||
var concat = rest(function(array, values) { | ||
if (!isArray(array)) { | ||
array = array == null ? [] : [Object(array)]; | ||
} | ||
values = baseFlatten(values); | ||
return arrayConcat(isArray(array) ? array : [Object(array)], values); | ||
return arrayConcat(array, values); | ||
}); | ||
export default concat; |
@@ -26,3 +26,3 @@ import apply from './internal/apply'; | ||
* [_.constant(true), _.constant('no match')] | ||
* ]) | ||
* ]); | ||
* | ||
@@ -29,0 +29,0 @@ * func({ 'a': 1, 'b': 2 }); |
@@ -19,3 +19,3 @@ import createAggregator from './internal/createAggregator'; | ||
* @param {Array|Object} collection The collection to iterate over. | ||
* @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. | ||
* @param {Function|Object|string} [iteratee=_.identity] The iteratee to transform keys. | ||
* @returns {Object} Returns the composed aggregate object. | ||
@@ -22,0 +22,0 @@ * @example |
@@ -8,8 +8,12 @@ import deburrLetter from './internal/deburrLetter'; | ||
/** Used to compose unicode character classes. */ | ||
var rsComboRange = '\\u0300-\\u036f\\ufe20-\\ufe23'; | ||
var rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', | ||
rsComboSymbolsRange = '\\u20d0-\\u20f0'; | ||
/** Used to compose unicode capture groups. */ | ||
var rsCombo = '[' + rsComboRange + ']'; | ||
var rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']'; | ||
/** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */ | ||
/** | ||
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and | ||
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). | ||
*/ | ||
var reComboMark = RegExp(rsCombo, 'g'); | ||
@@ -16,0 +20,0 @@ |
@@ -1,3 +0,1 @@ | ||
import baseSet from './internal/baseSet'; | ||
/** | ||
@@ -24,3 +22,3 @@ * The inverse of `_.toPairs`; this method returns an object composed | ||
var pair = pairs[index]; | ||
baseSet(result, pair[0], pair[1]); | ||
result[pair[0]] = pair[1]; | ||
} | ||
@@ -27,0 +25,0 @@ return result; |
@@ -12,3 +12,3 @@ import createAggregator from './internal/createAggregator'; | ||
* each element of `collection` through `iteratee`. The corresponding value | ||
* of each key is an array of the elements responsible for generating the key. | ||
* of each key is an array of elements responsible for generating the key. | ||
* The iteratee is invoked with one argument: (value). | ||
@@ -20,3 +20,3 @@ * | ||
* @param {Array|Object} collection The collection to iterate over. | ||
* @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. | ||
* @param {Function|Object|string} [iteratee=_.identity] The iteratee to transform keys. | ||
* @returns {Object} Returns the composed aggregate object. | ||
@@ -23,0 +23,0 @@ * @example |
@@ -9,10 +9,10 @@ /** | ||
* @param {*} [accumulator] The initial value. | ||
* @param {boolean} [initFromArray] Specify using the first element of `array` as the initial value. | ||
* @param {boolean} [initAccum] Specify using the first element of `array` as the initial value. | ||
* @returns {*} Returns the accumulated value. | ||
*/ | ||
function arrayReduce(array, iteratee, accumulator, initFromArray) { | ||
function arrayReduce(array, iteratee, accumulator, initAccum) { | ||
var index = -1, | ||
length = array.length; | ||
if (initFromArray && length) { | ||
if (initAccum && length) { | ||
accumulator = array[++index]; | ||
@@ -19,0 +19,0 @@ } |
@@ -9,8 +9,8 @@ /** | ||
* @param {*} [accumulator] The initial value. | ||
* @param {boolean} [initFromArray] Specify using the last element of `array` as the initial value. | ||
* @param {boolean} [initAccum] Specify using the last element of `array` as the initial value. | ||
* @returns {*} Returns the accumulated value. | ||
*/ | ||
function arrayReduceRight(array, iteratee, accumulator, initFromArray) { | ||
function arrayReduceRight(array, iteratee, accumulator, initAccum) { | ||
var length = array.length; | ||
if (initFromArray && length) { | ||
if (initAccum && length) { | ||
accumulator = array[--length]; | ||
@@ -17,0 +17,0 @@ } |
/** | ||
* The base implementation of methods like `_.find` and `_.findKey`, without | ||
* support for iteratee shorthands, which iterates over `collection` using | ||
* the provided `eachFunc`. | ||
* `eachFunc`. | ||
* | ||
@@ -6,0 +6,0 @@ * @private |
@@ -11,3 +11,2 @@ import apply from './apply'; | ||
* | ||
* | ||
* @private | ||
@@ -14,0 +13,0 @@ * @param {Object} object The object to query. |
@@ -50,3 +50,6 @@ import Stack from './Stack'; | ||
if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) { | ||
if (!(result === undefined | ||
? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) | ||
: result | ||
)) { | ||
return false; | ||
@@ -53,0 +56,0 @@ } |
@@ -16,6 +16,7 @@ import Stack from './Stack'; | ||
* @param {Object} source The source object. | ||
* @param {number} srcIndex The index of `source`. | ||
* @param {Function} [customizer] The function to customize merged values. | ||
* @param {Object} [stack] Tracks traversed source values and their merged counterparts. | ||
*/ | ||
function baseMerge(object, source, customizer, stack) { | ||
function baseMerge(object, source, srcIndex, customizer, stack) { | ||
if (object === source) { | ||
@@ -32,3 +33,3 @@ return; | ||
stack || (stack = new Stack); | ||
baseMergeDeep(object, source, key, baseMerge, customizer, stack); | ||
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); | ||
} | ||
@@ -35,0 +36,0 @@ else { |
@@ -22,2 +22,3 @@ import assignMergeValue from './assignMergeValue'; | ||
* @param {string} key The key of the value to merge. | ||
* @param {number} srcIndex The index of `source`. | ||
* @param {Function} mergeFunc The function to merge values. | ||
@@ -27,3 +28,3 @@ * @param {Function} [customizer] The function to customize assigned values. | ||
*/ | ||
function baseMergeDeep(object, source, key, mergeFunc, customizer, stack) { | ||
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { | ||
var objValue = object[key], | ||
@@ -43,13 +44,25 @@ srcValue = source[key], | ||
if (isArray(srcValue) || isTypedArray(srcValue)) { | ||
newValue = isArray(objValue) | ||
? objValue | ||
: ((isArrayLikeObject(objValue)) ? copyArray(objValue) : baseClone(srcValue)); | ||
if (isArray(objValue)) { | ||
newValue = srcIndex ? copyArray(objValue) : objValue; | ||
} | ||
else if (isArrayLikeObject(objValue)) { | ||
newValue = copyArray(objValue); | ||
} | ||
else { | ||
newValue = baseClone(srcValue); | ||
} | ||
} | ||
else if (isPlainObject(srcValue) || isArguments(srcValue)) { | ||
newValue = isArguments(objValue) | ||
? toPlainObject(objValue) | ||
: (isObject(objValue) ? objValue : baseClone(srcValue)); | ||
if (isArguments(objValue)) { | ||
newValue = toPlainObject(objValue); | ||
} | ||
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { | ||
newValue = baseClone(srcValue); | ||
} | ||
else { | ||
newValue = srcIndex ? baseClone(objValue) : objValue; | ||
} | ||
} | ||
else { | ||
isCommon = isFunction(srcValue); | ||
isCommon = false; | ||
} | ||
@@ -61,3 +74,3 @@ } | ||
// Recursively merge objects and arrays (susceptible to call stack limits). | ||
mergeFunc(newValue, srcValue, customizer, stack); | ||
mergeFunc(newValue, srcValue, srcIndex, customizer, stack); | ||
} | ||
@@ -64,0 +77,0 @@ assignMergeValue(object, key, newValue); |
@@ -14,3 +14,3 @@ import baseForIn from './baseForIn'; | ||
baseForIn(object, function(value, key) { | ||
if (predicate(value)) { | ||
if (predicate(value, key)) { | ||
result[key] = value; | ||
@@ -17,0 +17,0 @@ } |
/** | ||
* The base implementation of `_.reduce` and `_.reduceRight`, without support | ||
* for iteratee shorthands, which iterates over `collection` using the provided | ||
* `eachFunc`. | ||
* for iteratee shorthands, which iterates over `collection` using `eachFunc`. | ||
* | ||
@@ -10,10 +9,10 @@ * @private | ||
* @param {*} accumulator The initial value. | ||
* @param {boolean} initFromCollection Specify using the first or last element of `collection` as the initial value. | ||
* @param {boolean} initAccum Specify using the first or last element of `collection` as the initial value. | ||
* @param {Function} eachFunc The function to iterate over `collection`. | ||
* @returns {*} Returns the accumulated value. | ||
*/ | ||
function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) { | ||
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { | ||
eachFunc(collection, function(value, index, collection) { | ||
accumulator = initFromCollection | ||
? (initFromCollection = false, value) | ||
accumulator = initAccum | ||
? (initAccum = false, value) | ||
: iteratee(accumulator, value, index, collection); | ||
@@ -20,0 +19,0 @@ }); |
@@ -1,6 +0,6 @@ | ||
import _Symbol from './_Symbol'; | ||
import Symbol from './Symbol'; | ||
/** Used to convert symbols to primitives and strings. */ | ||
var symbolProto = _Symbol ? _Symbol.prototype : undefined, | ||
symbolValueOf = _Symbol ? symbolProto.valueOf : undefined; | ||
var symbolProto = Symbol ? Symbol.prototype : undefined, | ||
symbolValueOf = Symbol ? symbolProto.valueOf : undefined; | ||
@@ -15,5 +15,5 @@ /** | ||
function cloneSymbol(symbol) { | ||
return _Symbol ? Object(symbolValueOf.call(symbol)) : {}; | ||
return Symbol ? Object(symbolValueOf.call(symbol)) : {}; | ||
} | ||
export default cloneSymbol; |
@@ -27,3 +27,3 @@ import isIterateeCall from './isIterateeCall'; | ||
if (source) { | ||
assigner(object, source, customizer); | ||
assigner(object, source, index, customizer); | ||
} | ||
@@ -30,0 +30,0 @@ } |
@@ -6,3 +6,4 @@ import stringToArray from './stringToArray'; | ||
var rsAstralRange = '\\ud800-\\udfff', | ||
rsComboRange = '\\u0300-\\u036f\\ufe20-\\ufe23', | ||
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', | ||
rsComboSymbolsRange = '\\u20d0-\\u20f0', | ||
rsVarRange = '\\ufe0e\\ufe0f'; | ||
@@ -14,3 +15,3 @@ | ||
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ | ||
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); | ||
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); | ||
@@ -17,0 +18,0 @@ /** |
@@ -8,3 +8,4 @@ import repeat from '../repeat'; | ||
var rsAstralRange = '\\ud800-\\udfff', | ||
rsComboRange = '\\u0300-\\u036f\\ufe20-\\ufe23', | ||
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', | ||
rsComboSymbolsRange = '\\u20d0-\\u20f0', | ||
rsVarRange = '\\ufe0e\\ufe0f'; | ||
@@ -16,3 +17,3 @@ | ||
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ | ||
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); | ||
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); | ||
@@ -19,0 +20,0 @@ /* Built-in method references for those with the same name as other `lodash` methods. */ |
@@ -0,3 +1,3 @@ | ||
import Symbol from './Symbol'; | ||
import Uint8Array from './Uint8Array'; | ||
import _Symbol from './_Symbol'; | ||
import mapToArray from './mapToArray'; | ||
@@ -24,4 +24,4 @@ import setToArray from './setToArray'; | ||
/** Used to convert symbols to primitives and strings. */ | ||
var symbolProto = _Symbol ? _Symbol.prototype : undefined, | ||
symbolValueOf = _Symbol ? symbolProto.valueOf : undefined; | ||
var symbolProto = Symbol ? Symbol.prototype : undefined, | ||
symbolValueOf = Symbol ? symbolProto.valueOf : undefined; | ||
@@ -84,3 +84,3 @@ /** | ||
case symbolTag: | ||
return !!_Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other)); | ||
return !!Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other)); | ||
} | ||
@@ -87,0 +87,0 @@ return false; |
@@ -5,4 +5,3 @@ import baseHas from './baseHas'; | ||
/** Used to compose bitmasks for comparison styles. */ | ||
var UNORDERED_COMPARE_FLAG = 1, | ||
PARTIAL_COMPARE_FLAG = 2; | ||
var PARTIAL_COMPARE_FLAG = 2; | ||
@@ -24,3 +23,2 @@ /** | ||
var isPartial = bitmask & PARTIAL_COMPARE_FLAG, | ||
isUnordered = bitmask & UNORDERED_COMPARE_FLAG, | ||
objProps = keys(object), | ||
@@ -37,4 +35,3 @@ objLength = objProps.length, | ||
var key = objProps[index]; | ||
if (!(isPartial ? key in other : baseHas(other, key)) || | ||
!(isUnordered || key == othProps[index])) { | ||
if (!(isPartial ? key in other : baseHas(other, key))) { | ||
return false; | ||
@@ -41,0 +38,0 @@ } |
import realNames from './realNames'; | ||
/** Used for built-in method references. */ | ||
var objectProto = Object.prototype; | ||
/** Used to check objects for own properties. */ | ||
var hasOwnProperty = objectProto.hasOwnProperty; | ||
/** | ||
@@ -13,3 +19,3 @@ * Gets the name of `func`. | ||
array = realNames[result], | ||
length = array ? array.length : 0; | ||
length = hasOwnProperty.call(realNames, result) ? array.length : 0; | ||
@@ -16,0 +22,0 @@ while (length--) { |
@@ -1,2 +0,1 @@ | ||
import baseClone from './baseClone'; | ||
import baseMerge from './baseMerge'; | ||
@@ -20,7 +19,7 @@ import isObject from '../isObject'; | ||
stack.set(srcValue, objValue); | ||
baseMerge(objValue, srcValue, mergeDefaults, stack); | ||
baseMerge(objValue, srcValue, undefined, mergeDefaults, stack); | ||
} | ||
return objValue === undefined ? baseClone(srcValue) : objValue; | ||
return objValue; | ||
} | ||
export default mergeDefaults; |
/** Used to compose unicode character classes. */ | ||
var rsAstralRange = '\\ud800-\\udfff', | ||
rsComboRange = '\\u0300-\\u036f\\ufe20-\\ufe23', | ||
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', | ||
rsComboSymbolsRange = '\\u20d0-\\u20f0', | ||
rsVarRange = '\\ufe0e\\ufe0f'; | ||
@@ -8,4 +9,5 @@ | ||
var rsAstral = '[' + rsAstralRange + ']', | ||
rsCombo = '[' + rsComboRange + ']', | ||
rsModifier = '(?:\\ud83c[\\udffb-\\udfff])', | ||
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', | ||
rsFitz = '\\ud83c[\\udffb-\\udfff]', | ||
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', | ||
rsNonAstral = '[^' + rsAstralRange + ']', | ||
@@ -24,6 +26,6 @@ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', | ||
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ | ||
var reComplexSymbol = RegExp(rsSymbol + rsSeq, 'g'); | ||
var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); | ||
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ | ||
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); | ||
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); | ||
@@ -33,2 +35,3 @@ /** | ||
* | ||
* @private | ||
* @param {string} string The string to inspect. | ||
@@ -35,0 +38,0 @@ * @returns {number} Returns the string size. |
/** Used to compose unicode character classes. */ | ||
var rsAstralRange = '\\ud800-\\udfff', | ||
rsComboRange = '\\u0300-\\u036f\\ufe20-\\ufe23', | ||
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', | ||
rsComboSymbolsRange = '\\u20d0-\\u20f0', | ||
rsVarRange = '\\ufe0e\\ufe0f'; | ||
@@ -8,4 +9,5 @@ | ||
var rsAstral = '[' + rsAstralRange + ']', | ||
rsCombo = '[' + rsComboRange + ']', | ||
rsModifier = '(?:\\ud83c[\\udffb-\\udfff])', | ||
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', | ||
rsFitz = '\\ud83c[\\udffb-\\udfff]', | ||
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', | ||
rsNonAstral = '[^' + rsAstralRange + ']', | ||
@@ -24,3 +26,3 @@ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', | ||
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ | ||
var reComplexSymbol = RegExp(rsSymbol + rsSeq, 'g'); | ||
var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); | ||
@@ -27,0 +29,0 @@ /** |
@@ -17,2 +17,3 @@ import arrayMap from './internal/arrayMap'; | ||
* @example | ||
* | ||
* _.intersection([2, 1], [4, 2], [1, 2]); | ||
@@ -19,0 +20,0 @@ * // => [2] |
@@ -6,3 +6,3 @@ import baseIsEqual from './internal/baseIsEqual'; | ||
* invoked to compare values. If `customizer` returns `undefined` comparisons are | ||
* handled by the method instead. The `customizer` is invoked with up to seven arguments: | ||
* handled by the method instead. The `customizer` is invoked with up to six arguments: | ||
* (objValue, othValue [, index|key, object, other, stack]). | ||
@@ -9,0 +9,0 @@ * |
@@ -7,3 +7,3 @@ import baseIsMatch from './internal/baseIsMatch'; | ||
* is invoked to compare values. If `customizer` returns `undefined` comparisons | ||
* are handled by the method instead. The `customizer` is invoked with three | ||
* are handled by the method instead. The `customizer` is invoked with five | ||
* arguments: (objValue, srcValue, index|key, object, source). | ||
@@ -10,0 +10,0 @@ * |
@@ -13,3 +13,3 @@ import createAggregator from './internal/createAggregator'; | ||
* @param {Array|Object} collection The collection to iterate over. | ||
* @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. | ||
* @param {Function|Object|string} [iteratee=_.identity] The iteratee to transform keys. | ||
* @returns {Object} Returns the composed aggregate object. | ||
@@ -23,5 +23,2 @@ * @example | ||
* | ||
* _.keyBy(keyData, 'dir'); | ||
* // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } | ||
* | ||
* _.keyBy(keyData, function(o) { | ||
@@ -31,2 +28,5 @@ * return String.fromCharCode(o.code); | ||
* // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } | ||
* | ||
* _.keyBy(keyData, 'dir'); | ||
* // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } | ||
*/ | ||
@@ -33,0 +33,0 @@ var keyBy = createAggregator(function(result, value, key) { |
/** | ||
* @license | ||
* lodash 4.0.0 (Custom Build) <https://lodash.com/> | ||
* lodash 4.0.1 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="es" -o ./` | ||
@@ -23,3 +23,3 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
import LodashWrapper from './internal/LodashWrapper'; | ||
import _Symbol from './internal/_Symbol'; | ||
import Symbol from './internal/Symbol'; | ||
import arrayEach from './internal/arrayEach'; | ||
@@ -48,3 +48,3 @@ import arrayPush from './internal/arrayPush'; | ||
/** Used as the semantic version number. */ | ||
var VERSION = '4.0.0'; | ||
var VERSION = '4.0.1'; | ||
@@ -69,3 +69,3 @@ /** Used to compose bitmasks for wrapper metadata. */ | ||
/** Built-in value references. */ | ||
var iteratorSymbol = typeof (iteratorSymbol = _Symbol && _Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined; | ||
var iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined; | ||
@@ -237,4 +237,2 @@ /* Built-in method references for those with the same name as other `lodash` methods. */ | ||
// Add aliases. | ||
lodash.each = collection.forEach; | ||
lodash.eachRight = collection.forEachRight; | ||
lodash.extend = object.assignIn; | ||
@@ -378,2 +376,4 @@ lodash.extendWith = object.assignInWith; | ||
// Add aliases. | ||
lodash.each = collection.forEach; | ||
lodash.eachRight = collection.forEachRight; | ||
lodash.first = array.head; | ||
@@ -380,0 +380,0 @@ |
/** | ||
* @license | ||
* lodash 4.0.0 (Custom Build) <https://lodash.com/> | ||
* lodash 4.0.1 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="es" -o ./` | ||
@@ -63,2 +63,4 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
export { default as every } from './every'; | ||
export { default as extend } from './extend'; | ||
export { default as extendWith } from './extendWith'; | ||
export { default as fill } from './fill'; | ||
@@ -289,2 +291,3 @@ export { default as filter } from './filter'; | ||
export { default as wrapperFlatMap } from './wrapperFlatMap'; | ||
export { default as wrapperLodash } from './wrapperLodash'; | ||
export { default as wrapperNext } from './next'; | ||
@@ -291,0 +294,0 @@ export { default as wrapperPlant } from './plant'; |
@@ -32,7 +32,7 @@ import arrayMap from './internal/arrayMap'; | ||
* | ||
* _.map([1, 2], square); | ||
* // => [3, 6] | ||
* _.map([4, 8], square); | ||
* // => [16, 64] | ||
* | ||
* _.map({ 'a': 1, 'b': 2 }, square); | ||
* // => [3, 6] (iteration order is not guaranteed) | ||
* _.map({ 'a': 4, 'b': 8 }, square); | ||
* // => [16, 64] (iteration order is not guaranteed) | ||
* | ||
@@ -39,0 +39,0 @@ * var users = [ |
@@ -20,3 +20,3 @@ import baseExtremum from './internal/baseExtremum'; | ||
* | ||
* _.maxBy(objects, function(o) { return o.a; }); | ||
* _.maxBy(objects, function(o) { return o.n; }); | ||
* // => { 'n': 2 } | ||
@@ -23,0 +23,0 @@ * |
@@ -33,6 +33,6 @@ import baseMerge from './internal/baseMerge'; | ||
*/ | ||
var merge = createAssigner(function(object, source) { | ||
baseMerge(object, source); | ||
var merge = createAssigner(function(object, source, srcIndex) { | ||
baseMerge(object, source, srcIndex); | ||
}); | ||
export default merge; |
@@ -39,6 +39,6 @@ import baseMerge from './internal/baseMerge'; | ||
*/ | ||
var mergeWith = createAssigner(function(object, source, customizer) { | ||
baseMerge(object, source, customizer); | ||
var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { | ||
baseMerge(object, source, srcIndex, customizer); | ||
}); | ||
export default mergeWith; |
@@ -20,3 +20,3 @@ import baseExtremum from './internal/baseExtremum'; | ||
* | ||
* _.minBy(objects, function(o) { return o.a; }); | ||
* _.minBy(objects, function(o) { return o.n; }); | ||
* // => { 'n': 1 } | ||
@@ -23,0 +23,0 @@ * |
@@ -8,2 +8,4 @@ import assign from './assign'; | ||
import defaultsDeep from './defaultsDeep'; | ||
import extend from './extend'; | ||
import extendWith from './extendWith'; | ||
import findKey from './findKey'; | ||
@@ -44,9 +46,10 @@ import findLastKey from './findLastKey'; | ||
assign, assignIn, assignInWith, assignWith, create, | ||
defaults, defaultsDeep, findKey, findLastKey, forIn, | ||
forInRight, forOwn, forOwnRight, functions, functionsIn, | ||
get, has, hasIn, invert, invoke, | ||
keys, keysIn, mapKeys, mapValues, merge, | ||
mergeWith, omit, omitBy, pick, pickBy, | ||
result, set, setWith, toPairs, toPairsIn, | ||
transform, unset, values, valuesIn | ||
defaults, defaultsDeep, extend, extendWith, findKey, | ||
findLastKey, forIn, forInRight, forOwn, forOwnRight, | ||
functions, functionsIn, get, has, hasIn, | ||
invert, invoke, keys, keysIn, mapKeys, | ||
mapValues, merge, mergeWith, omit, omitBy, | ||
pick, pickBy, result, set, setWith, | ||
toPairs, toPairsIn, transform, unset, values, | ||
valuesIn | ||
}; |
@@ -8,2 +8,4 @@ export { default as assign } from './assign'; | ||
export { default as defaultsDeep } from './defaultsDeep'; | ||
export { default as extend } from './extend'; | ||
export { default as extendWith } from './extendWith'; | ||
export { default as findKey } from './findKey'; | ||
@@ -10,0 +12,0 @@ export { default as findLastKey } from './findLastKey'; |
@@ -23,5 +23,5 @@ import baseIteratee from './internal/baseIteratee'; | ||
function omitBy(object, predicate) { | ||
predicate = baseIteratee(predicate); | ||
return basePickBy(object, function(value) { | ||
return !predicate(value); | ||
predicate = baseIteratee(predicate, 2); | ||
return basePickBy(object, function(value, key) { | ||
return !predicate(value, key); | ||
}); | ||
@@ -28,0 +28,0 @@ } |
{ | ||
"name": "lodash-es", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Lodash exported as ES modules.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/custom-builds", |
@@ -18,3 +18,3 @@ import root from './internal/root'; | ||
* | ||
* **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E) | ||
* **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#x15.1.2.2) | ||
* of `parseInt`. | ||
@@ -21,0 +21,0 @@ * |
@@ -5,5 +5,5 @@ import createAggregator from './internal/createAggregator'; | ||
* Creates an array of elements split into two groups, the first of which | ||
* contains elements `predicate` returns truthy for, while the second of which | ||
* contains elements `predicate` returns falsey for. The predicate is invoked | ||
* with three arguments: (value, index|key, collection). | ||
* contains elements `predicate` returns truthy for, the second of which | ||
* contains elements `predicate` returns falsey for. The predicate is | ||
* invoked with one argument: (value). | ||
* | ||
@@ -10,0 +10,0 @@ * @static |
@@ -22,5 +22,5 @@ import baseIteratee from './internal/baseIteratee'; | ||
function pickBy(object, predicate) { | ||
return object == null ? {} : basePickBy(object, baseIteratee(predicate)); | ||
return object == null ? {} : basePickBy(object, baseIteratee(predicate, 2)); | ||
} | ||
export default pickBy; |
@@ -18,3 +18,3 @@ import basePullAll from './internal/basePullAll'; | ||
* | ||
* _.pull(array, [2, 3]); | ||
* _.pullAll(array, [2, 3]); | ||
* console.log(array); | ||
@@ -21,0 +21,0 @@ * // => [1, 1] |
@@ -7,4 +7,3 @@ import createRange from './internal/createRange'; | ||
* `start` is specified without an `end` or `step`. If `end` is not specified | ||
* it's set to `start` with `start` then set to `0`. If `end` is less than | ||
* `start` a zero-length range is created unless a negative `step` is specified. | ||
* it's set to `start` with `start` then set to `0`. | ||
* | ||
@@ -11,0 +10,0 @@ * **Note:** JavaScript follows the IEEE-754 standard for resolving |
@@ -1,2 +0,2 @@ | ||
# lodash-es v4.0.0 | ||
# lodash-es v4.0.1 | ||
@@ -10,2 +10,2 @@ The [lodash](https://lodash.com/) library exported as [ES](http://www.ecma-international.org/ecma-262/6.0/) modules. | ||
See the [package source](https://github.com/lodash/lodash/tree/4.0.0-es) for more details. | ||
See the [package source](https://github.com/lodash/lodash/tree/4.0.1-es) for more details. |
@@ -44,7 +44,7 @@ import arrayReduce from './internal/arrayReduce'; | ||
var func = isArray(collection) ? arrayReduce : baseReduce, | ||
initFromCollection = arguments.length < 3; | ||
initAccum = arguments.length < 3; | ||
return func(collection, baseIteratee(iteratee, 4), accumulator, initFromCollection, baseEach); | ||
return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); | ||
} | ||
export default reduce; |
@@ -29,7 +29,7 @@ import arrayReduceRight from './internal/arrayReduceRight'; | ||
var func = isArray(collection) ? arrayReduceRight : baseReduce, | ||
initFromCollection = arguments.length < 3; | ||
initAccum = arguments.length < 3; | ||
return func(collection, baseIteratee(iteratee, 4), accumulator, initFromCollection, baseEachRight); | ||
return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); | ||
} | ||
export default reduceRight; |
@@ -14,2 +14,3 @@ /** Used for built-in method references. */ | ||
* | ||
* @static | ||
* @memberOf _ | ||
@@ -16,0 +17,0 @@ * @category Array |
@@ -7,3 +7,4 @@ import baseClamp from './internal/baseClamp'; | ||
/** | ||
* Gets `n` random elements from `collection`. | ||
* Gets `n` random elements at unique keys from `collection` up to the | ||
* size of `collection`. | ||
* | ||
@@ -18,4 +19,7 @@ * @static | ||
* | ||
* _.sampleSize([1, 2, 3, 4], 2); | ||
* _.sampleSize([1, 2, 3], 2); | ||
* // => [3, 1] | ||
* | ||
* _.sampleSize([1, 2, 3], 4); | ||
* // => [2, 3, 1] | ||
*/ | ||
@@ -22,0 +26,0 @@ function sampleSize(collection, n) { |
@@ -1,2 +0,2 @@ | ||
import _Symbol from './internal/_Symbol'; | ||
import Symbol from './internal/Symbol'; | ||
import copyArray from './internal/copyArray'; | ||
@@ -17,3 +17,3 @@ import getTag from './internal/getTag'; | ||
/** Built-in value references. */ | ||
var iteratorSymbol = typeof (iteratorSymbol = _Symbol && _Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined; | ||
var iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined; | ||
@@ -20,0 +20,0 @@ /** |
@@ -17,3 +17,3 @@ import baseClamp from './internal/baseClamp'; | ||
* @param {*} value The value to convert. | ||
* @return {number} Returns the converted integer. | ||
* @returns {number} Returns the converted integer. | ||
* @example | ||
@@ -20,0 +20,0 @@ * |
@@ -1,2 +0,2 @@ | ||
import _Symbol from './internal/_Symbol'; | ||
import Symbol from './internal/Symbol'; | ||
import isSymbol from './isSymbol'; | ||
@@ -8,4 +8,4 @@ | ||
/** Used to convert symbols to primitives and strings. */ | ||
var symbolProto = _Symbol ? _Symbol.prototype : undefined, | ||
symbolToString = _Symbol ? symbolProto.toString : undefined; | ||
var symbolProto = Symbol ? Symbol.prototype : undefined, | ||
symbolToString = Symbol ? symbolProto.toString : undefined; | ||
@@ -41,3 +41,3 @@ /** | ||
if (isSymbol(value)) { | ||
return _Symbol ? symbolToString.call(value) : ''; | ||
return Symbol ? symbolToString.call(value) : ''; | ||
} | ||
@@ -44,0 +44,0 @@ var result = (value + ''); |
@@ -17,3 +17,4 @@ import isObject from './isObject'; | ||
var rsAstralRange = '\\ud800-\\udfff', | ||
rsComboRange = '\\u0300-\\u036f\\ufe20-\\ufe23', | ||
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', | ||
rsComboSymbolsRange = '\\u20d0-\\u20f0', | ||
rsVarRange = '\\ufe0e\\ufe0f'; | ||
@@ -25,3 +26,3 @@ | ||
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ | ||
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); | ||
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); | ||
@@ -28,0 +29,0 @@ /** |
@@ -5,2 +5,4 @@ import toString from './toString'; | ||
var rsAstralRange = '\\ud800-\\udfff', | ||
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', | ||
rsComboSymbolsRange = '\\u20d0-\\u20f0', | ||
rsDingbatRange = '\\u2700-\\u27bf', | ||
@@ -18,2 +20,3 @@ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', | ||
var rsBreak = '[' + rsBreakRange + ']', | ||
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', | ||
rsDigits = '\\d+', | ||
@@ -23,3 +26,4 @@ rsDingbat = '[' + rsDingbatRange + ']', | ||
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', | ||
rsModifier = '(?:\\ud83c[\\udffb-\\udfff])', | ||
rsFitz = '\\ud83c[\\udffb-\\udfff]', | ||
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', | ||
rsNonAstral = '[^' + rsAstralRange + ']', | ||
@@ -48,3 +52,4 @@ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', | ||
rsUpper + '?' + rsLowerMisc + '+', | ||
rsDigits + '(?:' + rsLowerMisc + '+)?', | ||
rsUpper + '+', | ||
rsDigits, | ||
rsEmoji | ||
@@ -51,0 +56,0 @@ ].join('|'), 'g'); |
/** | ||
* This method is the wrapper version of `_.flatMap`. | ||
* | ||
* @static | ||
* @name flatMap | ||
* @memberOf _ | ||
@@ -6,0 +6,0 @@ * @category Seq |
@@ -55,9 +55,8 @@ import LazyWrapper from './internal/LazyWrapper'; | ||
* `at`, `before`, `bind`, `bindAll`, `bindKey`, `chain`, `chunk`, `commit`, | ||
* `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, `curry`, | ||
* `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, `curry`, | ||
* `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, `difference`, | ||
* `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`, | ||
* `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`, | ||
* `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flip`, `flow`, | ||
* `flowRight`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, | ||
* `forOwnRight`, `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`, | ||
* `intersection`, `intersectionBy`, `intersectionWith`, invert`, `invokeMap`, | ||
* `flowRight`, `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`, | ||
* `intersection`, `intersectionBy`, `intersectionWith`, `invert`, `invokeMap`, | ||
* `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, | ||
@@ -81,18 +80,19 @@ * `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`, | ||
* `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, | ||
* `findLast`, `findLastIndex`, `findLastKey`, `floor`, `get`, `gt`, `gte`, | ||
* `has`, `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, | ||
* `invoke`, `isArguments`, `isArray`, `isArrayLike`, `isArrayLikeObject`, | ||
* `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, | ||
* `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMatch`, | ||
* `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, | ||
* `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, | ||
* `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`, `last`, | ||
* `lastIndexOf`, `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, | ||
* `mean`, `min`, `minBy`, `noConflict`, `noop`, `now`, `pad`, `padEnd`, | ||
* `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, `repeat`, | ||
* `result`, `round`, `runInContext`, `sample`, `shift`, `size`, `snakeCase`, | ||
* `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, | ||
* `startCase`, `startsWith`, `subtract`, `sum`, sumBy`, `template`, `times`, | ||
* `toLower`, `toInteger`, `toLength`, `toNumber`, `toSafeInteger`, toString`, | ||
* `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, | ||
* `findLast`, `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, | ||
* `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, | ||
* `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, | ||
* `isArguments`, `isArray`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, | ||
* `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, | ||
* `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMatch`, `isMatchWith`, | ||
* `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`, | ||
* `isPlainObject`, `isRegExp`, `isSafeInteger`, `isString`, `isUndefined`, | ||
* `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, | ||
* `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, | ||
* `noConflict`, `noop`, `now`, `pad`, `padEnd`, `padStart`, `parseInt`, | ||
* `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`, | ||
* `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, | ||
* `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, | ||
* `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toLower`, | ||
* `toInteger`, `toLength`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, | ||
* `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, | ||
* `upperCase`, `upperFirst`, `value`, and `words` | ||
@@ -99,0 +99,0 @@ * |
@@ -8,3 +8,3 @@ import baseWrapperValue from './internal/baseWrapperValue'; | ||
* @memberOf _ | ||
* @alias run, toJSON, valueOf | ||
* @alias toJSON, valueOf | ||
* @category Seq | ||
@@ -11,0 +11,0 @@ * @returns {*} Returns the resolved unwrapped value. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
529690
528
16444
2