Comparing version 4.10.0 to 4.11.0
@@ -5,2 +5,3 @@ import arrayMap from './_arrayMap'; | ||
import baseSortBy from './_baseSortBy'; | ||
import baseUnary from './_baseUnary'; | ||
import compareMultiple from './_compareMultiple'; | ||
@@ -20,3 +21,3 @@ import identity from './identity'; | ||
var index = -1; | ||
iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseIteratee); | ||
iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); | ||
@@ -23,0 +24,0 @@ var result = baseMap(collection, function(value, key, collection) { |
@@ -1,2 +0,2 @@ | ||
import copyObjectWith from './_copyObjectWith'; | ||
import assignValue from './_assignValue'; | ||
@@ -10,8 +10,23 @@ /** | ||
* @param {Object} [object={}] The object to copy properties to. | ||
* @param {Function} [customizer] The function to customize copied values. | ||
* @returns {Object} Returns `object`. | ||
*/ | ||
function copyObject(source, props, object) { | ||
return copyObjectWith(source, props, object); | ||
function copyObject(source, props, object, customizer) { | ||
object || (object = {}); | ||
var index = -1, | ||
length = props.length; | ||
while (++index < length) { | ||
var key = props[index]; | ||
var newValue = customizer | ||
? customizer(object[key], source[key], key, object, source) | ||
: source[key]; | ||
assignValue(object, key, newValue); | ||
} | ||
return object; | ||
} | ||
export default copyObject; |
@@ -5,2 +5,8 @@ import arrayReduce from './_arrayReduce'; | ||
/** Used to compose unicode capture groups. */ | ||
var rsApos = "['\u2019]"; | ||
/** Used to match apostrophes. */ | ||
var reApos = RegExp(rsApos, 'g'); | ||
/** | ||
@@ -15,3 +21,3 @@ * Creates a function like `_.camelCase`. | ||
return function(string) { | ||
return arrayReduce(words(deburr(string)), callback, ''); | ||
return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); | ||
}; | ||
@@ -18,0 +24,0 @@ } |
@@ -5,2 +5,4 @@ import apply from './_apply'; | ||
import baseIteratee from './_baseIteratee'; | ||
import baseUnary from './_baseUnary'; | ||
import isArray from './isArray'; | ||
import isFlattenableIteratee from './_isFlattenableIteratee'; | ||
@@ -18,3 +20,6 @@ import rest from './rest'; | ||
return rest(function(iteratees) { | ||
iteratees = arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseIteratee); | ||
iteratees = (iteratees.length == 1 && isArray(iteratees[0])) | ||
? arrayMap(iteratees[0], baseUnary(baseIteratee)) | ||
: arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(baseIteratee)); | ||
return rest(function(args) { | ||
@@ -21,0 +26,0 @@ var thisArg = this; |
@@ -1,2 +0,1 @@ | ||
import copyArray from './_copyArray'; | ||
import isLaziable from './_isLaziable'; | ||
@@ -33,3 +32,2 @@ import setData from './_setData'; | ||
var isCurry = bitmask & CURRY_FLAG, | ||
newArgPos = argPos ? copyArray(argPos) : undefined, | ||
newHolders = isCurry ? holders : undefined, | ||
@@ -48,3 +46,3 @@ newHoldersRight = isCurry ? undefined : holders, | ||
func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, | ||
newHoldersRight, newArgPos, ary, arity | ||
newHoldersRight, argPos, ary, arity | ||
]; | ||
@@ -51,0 +49,0 @@ |
import composeArgs from './_composeArgs'; | ||
import composeArgsRight from './_composeArgsRight'; | ||
import copyArray from './_copyArray'; | ||
import replaceHolders from './_replaceHolders'; | ||
@@ -61,4 +60,4 @@ | ||
var partials = data[3]; | ||
data[3] = partials ? composeArgs(partials, value, source[4]) : copyArray(value); | ||
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : copyArray(source[4]); | ||
data[3] = partials ? composeArgs(partials, value, source[4]) : value; | ||
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; | ||
} | ||
@@ -69,4 +68,4 @@ // Compose partial right arguments. | ||
partials = data[5]; | ||
data[5] = partials ? composeArgsRight(partials, value, source[6]) : copyArray(value); | ||
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : copyArray(source[6]); | ||
data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; | ||
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; | ||
} | ||
@@ -76,3 +75,3 @@ // Use source `argPos` if available. | ||
if (value) { | ||
data[7] = copyArray(value); | ||
data[7] = value; | ||
} | ||
@@ -79,0 +78,0 @@ // Use source `ary` if it's smaller. |
@@ -27,2 +27,3 @@ import chunk from './chunk'; | ||
import lastIndexOf from './lastIndexOf'; | ||
import nth from './nth'; | ||
import pull from './pull'; | ||
@@ -72,10 +73,10 @@ import pullAll from './pullAll'; | ||
intersection, intersectionBy, intersectionWith, join, last, | ||
lastIndexOf, pull, pullAll, pullAllBy, pullAllWith, | ||
pullAt, remove, reverse, slice, sortedIndex, | ||
sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, | ||
sortedUniq, sortedUniqBy, tail, take, takeRight, | ||
takeRightWhile, takeWhile, union, unionBy, unionWith, | ||
uniq, uniqBy, uniqWith, unzip, unzipWith, | ||
without, xor, xorBy, xorWith, zip, | ||
zipObject, zipObjectDeep, zipWith | ||
lastIndexOf, nth, pull, pullAll, pullAllBy, | ||
pullAllWith, pullAt, remove, reverse, slice, | ||
sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, | ||
sortedLastIndexOf, sortedUniq, sortedUniqBy, tail, take, | ||
takeRight, takeRightWhile, takeWhile, union, unionBy, | ||
unionWith, uniq, uniqBy, uniqWith, unzip, | ||
unzipWith, without, xor, xorBy, xorWith, | ||
zip, zipObject, zipObjectDeep, zipWith | ||
}; |
@@ -27,2 +27,3 @@ export { default as chunk } from './chunk'; | ||
export { default as lastIndexOf } from './lastIndexOf'; | ||
export { default as nth } from './nth'; | ||
export { default as pull } from './pull'; | ||
@@ -29,0 +30,0 @@ export { default as pullAll } from './pullAll'; |
@@ -1,2 +0,2 @@ | ||
import copyObjectWith from './_copyObjectWith'; | ||
import copyObject from './_copyObject'; | ||
import createAssigner from './_createAssigner'; | ||
@@ -34,5 +34,5 @@ import keysIn from './keysIn'; | ||
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { | ||
copyObjectWith(source, keysIn(source), object, customizer); | ||
copyObject(source, keysIn(source), object, customizer); | ||
}); | ||
export default assignInWith; |
@@ -1,2 +0,2 @@ | ||
import copyObjectWith from './_copyObjectWith'; | ||
import copyObject from './_copyObject'; | ||
import createAssigner from './_createAssigner'; | ||
@@ -33,5 +33,5 @@ import keys from './keys'; | ||
var assignWith = createAssigner(function(object, source, srcIndex, customizer) { | ||
copyObjectWith(source, keys(source), object, customizer); | ||
copyObject(source, keys(source), object, customizer); | ||
}); | ||
export default assignWith; |
@@ -20,5 +20,5 @@ /** | ||
function head(array) { | ||
return array ? array[0] : undefined; | ||
return (array && array.length) ? array[0] : undefined; | ||
} | ||
export default head; |
/** | ||
* @license | ||
* lodash 4.10.0 (Custom Build) <https://lodash.com/> | ||
* lodash 4.11.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="es" -o ./` | ||
@@ -47,3 +47,3 @@ * Copyright jQuery Foundation and other contributors <https://jquery.org/> | ||
/** Used as the semantic version number. */ | ||
var VERSION = '4.10.0'; | ||
var VERSION = '4.11.0'; | ||
@@ -346,2 +346,3 @@ /** Used to compose bitmasks for wrapper metadata. */ | ||
lodash.multiply = math.multiply; | ||
lodash.nth = array.nth; | ||
lodash.noop = util.noop; | ||
@@ -348,0 +349,0 @@ lodash.now = date.now; |
/** | ||
* @license | ||
* lodash 4.10.0 (Custom Build) <https://lodash.com/> | ||
* lodash 4.11.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="es" -o ./` | ||
@@ -187,2 +187,3 @@ * Copyright jQuery Foundation and other contributors <https://jquery.org/> | ||
export { default as now } from './now'; | ||
export { default as nth } from './nth'; | ||
export { default as nthArg } from './nthArg'; | ||
@@ -189,0 +190,0 @@ export { default as omit } from './omit'; |
@@ -0,5 +1,8 @@ | ||
import baseNth from './_baseNth'; | ||
import rest from './rest'; | ||
import toInteger from './toInteger'; | ||
/** | ||
* Creates a function that returns its nth argument. | ||
* Creates a function that returns its nth argument. If `n` is negative, | ||
* the nth argument from the end is returned. | ||
* | ||
@@ -15,13 +18,16 @@ * @static | ||
* var func = _.nthArg(1); | ||
* func('a', 'b', 'c', 'd'); | ||
* // => 'b' | ||
* | ||
* func('a', 'b', 'c'); | ||
* // => 'b' | ||
* var func = _.nthArg(-2); | ||
* func('a', 'b', 'c', 'd'); | ||
* // => 'c' | ||
*/ | ||
function nthArg(n) { | ||
n = toInteger(n); | ||
return function() { | ||
return arguments[n]; | ||
}; | ||
return rest(function(args) { | ||
return baseNth(args, n); | ||
}); | ||
} | ||
export default nthArg; |
@@ -5,2 +5,4 @@ import apply from './_apply'; | ||
import baseIteratee from './_baseIteratee'; | ||
import baseUnary from './_baseUnary'; | ||
import isArray from './isArray'; | ||
import isFlattenableIteratee from './_isFlattenableIteratee'; | ||
@@ -45,3 +47,6 @@ import rest from './rest'; | ||
var overArgs = rest(function(func, transforms) { | ||
transforms = arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseIteratee); | ||
transforms = (transforms.length == 1 && isArray(transforms[0])) | ||
? arrayMap(transforms[0], baseUnary(baseIteratee)) | ||
: arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseUnary(baseIteratee)); | ||
var funcsLength = transforms.length; | ||
@@ -48,0 +53,0 @@ return rest(function(args) { |
{ | ||
"name": "lodash-es", | ||
"version": "4.10.0", | ||
"version": "4.11.0", | ||
"description": "Lodash exported as ES modules.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/custom-builds", |
@@ -1,2 +0,2 @@ | ||
# lodash-es v4.10.0 | ||
# lodash-es v4.11.0 | ||
@@ -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.10.0-es) for more details. | ||
See the [package source](https://github.com/lodash/lodash/tree/4.11.0-es) for more details. |
import toString from './toString'; | ||
/** Used for built-in method references. */ | ||
var stringProto = String.prototype; | ||
/* Built-in method references for those with the same name as other `lodash` methods. */ | ||
var nativeReplace = stringProto.replace; | ||
/** | ||
@@ -26,5 +32,5 @@ * Replaces matches for `pattern` in `string` with `replacement`. | ||
return args.length < 3 ? string : string.replace(args[1], args[2]); | ||
return args.length < 3 ? string : nativeReplace.call(string, args[1], args[2]); | ||
} | ||
export default replace; |
import baseFlatten from './_baseFlatten'; | ||
import baseOrderBy from './_baseOrderBy'; | ||
import isArray from './isArray'; | ||
import isFlattenableIteratee from './_isFlattenableIteratee'; | ||
import isIterateeCall from './_isIterateeCall'; | ||
@@ -50,5 +52,9 @@ import rest from './rest'; | ||
} | ||
return baseOrderBy(collection, baseFlatten(iteratees, 1), []); | ||
iteratees = (iteratees.length == 1 && isArray(iteratees[0])) | ||
? iteratees[0] | ||
: baseFlatten(iteratees, 1, isFlattenableIteratee); | ||
return baseOrderBy(collection, iteratees, []); | ||
}); | ||
export default sortBy; |
@@ -11,2 +11,8 @@ import castSlice from './_castSlice'; | ||
/** Used for built-in method references. */ | ||
var stringProto = String.prototype; | ||
/* Built-in method references for those with the same name as other `lodash` methods. */ | ||
var nativeSplit = stringProto.split; | ||
/** | ||
@@ -49,5 +55,5 @@ * Splits `string` by `separator`. | ||
} | ||
return string.split(separator, limit); | ||
return nativeSplit.call(string, separator, limit); | ||
} | ||
export default split; |
13
words.js
@@ -21,3 +21,4 @@ import toString from './toString'; | ||
/** Used to compose unicode capture groups. */ | ||
var rsBreak = '[' + rsBreakRange + ']', | ||
var rsApos = "['\u2019]", | ||
rsBreak = '[' + rsBreakRange + ']', | ||
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', | ||
@@ -39,2 +40,4 @@ rsDigits = '\\d+', | ||
rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')', | ||
rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', | ||
rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', | ||
reOptMod = rsModifier + '?', | ||
@@ -48,6 +51,6 @@ rsOptVar = '[' + rsVarRange + ']?', | ||
var reComplexWord = RegExp([ | ||
rsUpper + '?' + rsLower + '+(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', | ||
rsUpperMisc + '+(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')', | ||
rsUpper + '?' + rsLowerMisc + '+', | ||
rsUpper + '+', | ||
rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', | ||
rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')', | ||
rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr, | ||
rsUpper + '+' + rsOptUpperContr, | ||
rsDigits, | ||
@@ -54,0 +57,0 @@ rsEmoji |
@@ -94,3 +94,3 @@ import LazyWrapper from './_LazyWrapper'; | ||
* `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`, | ||
* `noConflict`, `noop`, `now`, `pad`, `padEnd`, `padStart`, `parseInt`, | ||
* `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`, | ||
* `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`, | ||
@@ -97,0 +97,0 @@ * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, |
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
578778
574
18319