Comparing version 4.7.0 to 4.8.0
@@ -8,3 +8,3 @@ /** | ||
* @param {*} thisArg The `this` binding of `func`. | ||
* @param {...*} args The arguments to invoke `func` with. | ||
* @param {Array} args The arguments to invoke `func` with. | ||
* @returns {*} Returns the result of `func`. | ||
@@ -11,0 +11,0 @@ */ |
import baseIsMatch from './_baseIsMatch'; | ||
import getMatchData from './_getMatchData'; | ||
import matchesStrictComparable from './_matchesStrictComparable'; | ||
@@ -14,12 +15,3 @@ /** | ||
if (matchData.length == 1 && matchData[0][2]) { | ||
var key = matchData[0][0], | ||
value = matchData[0][1]; | ||
return function(object) { | ||
if (object == null) { | ||
return false; | ||
} | ||
return object[key] === value && | ||
(value !== undefined || (key in Object(object))); | ||
}; | ||
return matchesStrictComparable(matchData[0][0], matchData[0][1]); | ||
} | ||
@@ -26,0 +18,0 @@ return function(object) { |
import baseIsEqual from './_baseIsEqual'; | ||
import get from './get'; | ||
import hasIn from './hasIn'; | ||
import isKey from './_isKey'; | ||
import isStrictComparable from './_isStrictComparable'; | ||
import matchesStrictComparable from './_matchesStrictComparable'; | ||
@@ -18,2 +21,5 @@ /** Used to compose bitmasks for comparison styles. */ | ||
function baseMatchesProperty(path, srcValue) { | ||
if (isKey(path) && isStrictComparable(srcValue)) { | ||
return matchesStrictComparable(path, srcValue); | ||
} | ||
return function(object) { | ||
@@ -20,0 +26,0 @@ var objValue = get(object, path); |
@@ -14,4 +14,4 @@ import baseCreate from './_baseCreate'; | ||
return function() { | ||
// Use a `switch` statement to work with class constructors. | ||
// See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist | ||
// Use a `switch` statement to work with class constructors. See | ||
// http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist | ||
// for more details. | ||
@@ -18,0 +18,0 @@ var args = arguments; |
import apply from './_apply'; | ||
import arrayMap from './_arrayMap'; | ||
import baseFlatten from './_baseFlatten'; | ||
import baseIteratee from './_baseIteratee'; | ||
@@ -16,3 +15,3 @@ import rest from './rest'; | ||
return rest(function(iteratees) { | ||
iteratees = arrayMap(baseFlatten(iteratees, 1), baseIteratee); | ||
iteratees = arrayMap(iteratees, baseIteratee); | ||
return rest(function(args) { | ||
@@ -19,0 +18,0 @@ var thisArg = this; |
@@ -9,5 +9,4 @@ import apply from './_apply'; | ||
/** | ||
* Creates a function that wraps `func` to invoke it with the optional `this` | ||
* binding of `thisArg` and the `partials` prepended to those provided to | ||
* the wrapper. | ||
* Creates a function that wraps `func` to invoke it with the `this` binding | ||
* of `thisArg` and `partials` prepended to the arguments it receives. | ||
* | ||
@@ -14,0 +13,0 @@ * @private |
@@ -81,3 +81,4 @@ import Symbol from './_Symbol'; | ||
// Coerce regexes to strings and treat strings, primitives and objects, | ||
// as equal. See https://es5.github.io/#x15.10.6.4 for more details. | ||
// as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring | ||
// for more details. | ||
return object == (other + ''); | ||
@@ -84,0 +85,0 @@ |
@@ -6,2 +6,3 @@ import DataView from './_DataView'; | ||
import WeakMap from './_WeakMap'; | ||
import toSource from './_toSource'; | ||
@@ -20,7 +21,5 @@ /** `Object#toString` result references. */ | ||
/** Used to resolve the decompiled source of functions. */ | ||
var funcToString = Function.prototype.toString; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -31,7 +30,7 @@ */ | ||
/** Used to detect maps, sets, and weakmaps. */ | ||
var dataViewCtorString = DataView ? (DataView + '') : '', | ||
mapCtorString = Map ? funcToString.call(Map) : '', | ||
promiseCtorString = Promise ? funcToString.call(Promise) : '', | ||
setCtorString = Set ? funcToString.call(Set) : '', | ||
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : ''; | ||
var dataViewCtorString = toSource(DataView), | ||
mapCtorString = toSource(Map), | ||
promiseCtorString = toSource(Promise), | ||
setCtorString = toSource(Set), | ||
weakMapCtorString = toSource(WeakMap); | ||
@@ -59,3 +58,3 @@ /** | ||
Ctor = result == objectTag ? value.constructor : null, | ||
ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : ''; | ||
ctorString = toSource(Ctor); | ||
@@ -62,0 +61,0 @@ if (ctorString) { |
@@ -19,27 +19,23 @@ import baseCastPath from './_baseCastPath'; | ||
function hasPath(object, path, hasFunc) { | ||
if (object == null) { | ||
return false; | ||
} | ||
var result = hasFunc(object, path); | ||
if (!result && !isKey(path)) { | ||
path = baseCastPath(path); | ||
path = isKey(path, object) ? [path] : baseCastPath(path); | ||
var index = -1, | ||
length = path.length; | ||
var result, | ||
index = -1, | ||
length = path.length; | ||
while (object != null && ++index < length) { | ||
var key = path[index]; | ||
if (!(result = hasFunc(object, key))) { | ||
break; | ||
} | ||
object = object[key]; | ||
while (++index < length) { | ||
var key = path[index]; | ||
if (!(result = object != null && hasFunc(object, key))) { | ||
break; | ||
} | ||
object = object[key]; | ||
} | ||
var length = object ? object.length : undefined; | ||
return result || ( | ||
!!length && isLength(length) && isIndex(path, length) && | ||
(isArray(object) || isString(object) || isArguments(object)) | ||
); | ||
if (result) { | ||
return result; | ||
} | ||
var length = object ? object.length : 0; | ||
return !!length && isLength(length) && isIndex(key, length) && | ||
(isArray(object) || isString(object) || isArguments(object)); | ||
} | ||
export default hasPath; |
@@ -7,4 +7,4 @@ import createWrapper from './_createWrapper'; | ||
/** | ||
* Creates a function that accepts up to `n` arguments, ignoring any | ||
* additional arguments. | ||
* Creates a function that invokes `func`, with up to `n` arguments, | ||
* ignoring any additional arguments. | ||
* | ||
@@ -11,0 +11,0 @@ * @static |
@@ -12,4 +12,3 @@ import createWrapper from './_createWrapper'; | ||
* Creates a function that invokes `func` with the `this` binding of `thisArg` | ||
* and prepends any additional `_.bind` arguments to those provided to the | ||
* bound function. | ||
* and `partials` prepended to the arguments it receives. | ||
* | ||
@@ -16,0 +15,0 @@ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, |
@@ -12,4 +12,4 @@ import createWrapper from './_createWrapper'; | ||
/** | ||
* Creates a function that invokes the method at `object[key]` and prepends | ||
* any additional `_.bindKey` arguments to those provided to the bound function. | ||
* Creates a function that invokes the method at `object[key]` with `partials` | ||
* prepended to the arguments it receives. | ||
* | ||
@@ -16,0 +16,0 @@ * This method differs from `_.bind` by allowing bound functions to reference |
13
chunk.js
import baseSlice from './_baseSlice'; | ||
import isIterateeCall from './_isIterateeCall'; | ||
import toInteger from './toInteger'; | ||
@@ -18,3 +19,4 @@ | ||
* @param {Array} array The array to process. | ||
* @param {number} [size=0] The length of each chunk. | ||
* @param {number} [size=1] The length of each chunk | ||
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. | ||
* @returns {Array} Returns the new array containing chunks. | ||
@@ -29,5 +31,8 @@ * @example | ||
*/ | ||
function chunk(array, size) { | ||
size = nativeMax(toInteger(size), 0); | ||
function chunk(array, size, guard) { | ||
if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { | ||
size = 1; | ||
} else { | ||
size = nativeMax(toInteger(size), 0); | ||
} | ||
var length = array ? array.length : 0; | ||
@@ -34,0 +39,0 @@ if (!length || size < 1) { |
@@ -11,5 +11,5 @@ import createAggregator from './_createAggregator'; | ||
* Creates an object composed of keys generated from the results of running | ||
* each element of `collection` through `iteratee`. The corresponding value | ||
* of each key is the number of times the key was returned by `iteratee`. | ||
* The iteratee is invoked with one argument: (value). | ||
* each element of `collection` thru `iteratee`. The corresponding value of | ||
* each key is the number of times the key was returned by `iteratee`. The | ||
* iteratee is invoked with one argument: (value). | ||
* | ||
@@ -16,0 +16,0 @@ * @static |
import toString from './toString'; | ||
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */ | ||
/** | ||
* Used to match `RegExp` | ||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). | ||
*/ | ||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, | ||
@@ -5,0 +8,0 @@ reHasRegExpChar = RegExp(reRegExpChar.source); |
@@ -6,4 +6,4 @@ import baseFlatten from './_baseFlatten'; | ||
* Creates a flattened array of values by running each element in `collection` | ||
* through `iteratee` and flattening the mapped results. The iteratee is | ||
* invoked with three arguments: (value, index|key, collection). | ||
* thru `iteratee` and flattening the mapped results. The iteratee is invoked | ||
* with three arguments: (value, index|key, collection). | ||
* | ||
@@ -10,0 +10,0 @@ * @static |
@@ -11,5 +11,5 @@ import createAggregator from './_createAggregator'; | ||
* Creates an object composed of keys generated from the results of running | ||
* each element of `collection` through `iteratee`. The corresponding value | ||
* of each key is an array of elements responsible for generating the key. | ||
* The iteratee is invoked with one argument: (value). | ||
* each element of `collection` thru `iteratee`. The corresponding value of | ||
* each key is an array of elements responsible for generating the key. The | ||
* iteratee is invoked with one argument: (value). | ||
* | ||
@@ -16,0 +16,0 @@ * @static |
@@ -32,5 +32,5 @@ import baseHas from './_baseHas'; | ||
function has(object, path) { | ||
return hasPath(object, path, baseHas); | ||
return object != null && hasPath(object, path, baseHas); | ||
} | ||
export default has; |
@@ -31,5 +31,5 @@ import baseHasIn from './_baseHasIn'; | ||
function hasIn(object, path) { | ||
return hasPath(object, path, baseHasIn); | ||
return object != null && hasPath(object, path, baseHasIn); | ||
} | ||
export default hasIn; |
@@ -12,4 +12,4 @@ import baseIteratee from './_baseIteratee'; | ||
* This method is like `_.invert` except that the inverted object is generated | ||
* from the results of running each element of `object` through `iteratee`. | ||
* The corresponding inverted value of each inverted key is an array of keys | ||
* from the results of running each element of `object` thru `iteratee`. The | ||
* corresponding inverted value of each inverted key is an array of keys | ||
* responsible for generating the inverted value. The iteratee is invoked | ||
@@ -16,0 +16,0 @@ * with one argument: (value). |
@@ -13,3 +13,4 @@ import isArrayLikeObject from './isArrayLikeObject'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -16,0 +17,0 @@ */ |
@@ -9,3 +9,4 @@ import isObjectLike from './isObjectLike'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -12,0 +13,0 @@ */ |
@@ -10,3 +10,4 @@ import isObjectLike from './isObjectLike'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -13,0 +14,0 @@ */ |
@@ -10,3 +10,4 @@ import isObjectLike from './isObjectLike'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -13,0 +14,0 @@ */ |
@@ -10,3 +10,4 @@ import isObjectLike from './isObjectLike'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -13,0 +14,0 @@ */ |
@@ -11,3 +11,4 @@ import isObject from './isObject'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -14,0 +15,0 @@ */ |
@@ -6,5 +6,6 @@ import isNumber from './isNumber'; | ||
* | ||
* **Note:** This method is not the same as | ||
* [`isNaN`](https://es5.github.io/#x15.1.2.4) which returns `true` for | ||
* `undefined` and other non-numeric values. | ||
* **Note:** This method is based on | ||
* [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as | ||
* global [`isNaN`](https://mdn.io/isNaN) which returns `true` for | ||
* `undefined` and other non-number values. | ||
* | ||
@@ -11,0 +12,0 @@ * @static |
import isFunction from './isFunction'; | ||
import isHostObject from './_isHostObject'; | ||
import isObjectLike from './isObjectLike'; | ||
import isObject from './isObject'; | ||
import toSource from './_toSource'; | ||
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */ | ||
/** | ||
* Used to match `RegExp` | ||
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). | ||
*/ | ||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; | ||
@@ -45,12 +49,9 @@ | ||
function isNative(value) { | ||
if (value == null) { | ||
if (!isObject(value)) { | ||
return false; | ||
} | ||
if (isFunction(value)) { | ||
return reIsNative.test(funcToString.call(value)); | ||
} | ||
return isObjectLike(value) && | ||
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value); | ||
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; | ||
return pattern.test(toSource(value)); | ||
} | ||
export default isNative; |
@@ -10,3 +10,4 @@ import isObjectLike from './isObjectLike'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -13,0 +14,0 @@ */ |
/** | ||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. | ||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
* Checks if `value` is the | ||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) | ||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
* | ||
@@ -5,0 +6,0 @@ * @static |
@@ -21,3 +21,4 @@ import getPrototype from './_getPrototype'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -24,0 +25,0 @@ */ |
@@ -10,3 +10,4 @@ import isObject from './isObject'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -13,0 +14,0 @@ */ |
@@ -11,3 +11,4 @@ import isArray from './isArray'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -14,0 +15,0 @@ */ |
@@ -10,3 +10,4 @@ import isObjectLike from './isObjectLike'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -13,0 +14,0 @@ */ |
@@ -51,3 +51,4 @@ import isLength from './isLength'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -54,0 +55,0 @@ */ |
@@ -10,3 +10,4 @@ import isObjectLike from './isObjectLike'; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -13,0 +14,0 @@ */ |
@@ -5,4 +5,4 @@ import createAggregator from './_createAggregator'; | ||
* Creates an object composed of keys generated from the results of running | ||
* each element of `collection` through `iteratee`. The corresponding value | ||
* of each key is the last element responsible for generating the key. The | ||
* each element of `collection` thru `iteratee`. The corresponding value of | ||
* each key is the last element responsible for generating the key. The | ||
* iteratee is invoked with one argument: (value). | ||
@@ -9,0 +9,0 @@ * |
/** | ||
* @license | ||
* lodash 4.7.0 (Custom Build) <https://lodash.com/> | ||
* lodash 4.8.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.7.0'; | ||
var VERSION = '4.8.0'; | ||
@@ -50,0 +50,0 @@ /** Used to compose bitmasks for wrapper metadata. */ |
/** | ||
* @license | ||
* lodash 4.7.0 (Custom Build) <https://lodash.com/> | ||
* lodash 4.8.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="es" -o ./` | ||
@@ -5,0 +5,0 @@ * Copyright jQuery Foundation and other contributors <https://jquery.org/> |
10
map.js
@@ -7,3 +7,3 @@ import arrayMap from './_arrayMap'; | ||
/** | ||
* Creates an array of values by running each element in `collection` through | ||
* Creates an array of values by running each element in `collection` thru | ||
* `iteratee`. The iteratee is invoked with three arguments: | ||
@@ -16,6 +16,6 @@ * (value, index|key, collection). | ||
* The guarded methods are: | ||
* `ary`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, `fill`, | ||
* `invert`, `parseInt`, `random`, `range`, `rangeRight`, `slice`, `some`, | ||
* `sortBy`, `take`, `takeRight`, `template`, `trim`, `trimEnd`, `trimStart`, | ||
* and `words` | ||
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, | ||
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, | ||
* `sampleSize`, `slice`, `some`, `sortBy`, `take`, `takeRight`, `template`, | ||
* `trim`, `trimEnd`, `trimStart`, and `words` | ||
* | ||
@@ -22,0 +22,0 @@ * @static |
@@ -7,4 +7,4 @@ import baseForOwn from './_baseForOwn'; | ||
* same values as `object` and keys generated by running each own enumerable | ||
* string keyed property of `object` through `iteratee`. The iteratee is | ||
* invoked with three arguments: (value, key, object). | ||
* string keyed property of `object` thru `iteratee`. The iteratee is invoked | ||
* with three arguments: (value, key, object). | ||
* | ||
@@ -11,0 +11,0 @@ * @static |
@@ -5,4 +5,4 @@ import baseForOwn from './_baseForOwn'; | ||
/** | ||
* Creates an object with the same keys as `object` and values generated by | ||
* running each own enumerable string keyed property of `object` through | ||
* Creates an object with the same keys as `object` and values generated | ||
* by running each own enumerable string keyed property of `object` thru | ||
* `iteratee`. The iteratee is invoked with three arguments: | ||
@@ -9,0 +9,0 @@ * (value, key, object). |
@@ -5,4 +5,4 @@ import arrayMap from './_arrayMap'; | ||
/** | ||
* Creates a function that invokes `iteratees` with the arguments provided | ||
* to the created function and returns their results. | ||
* Creates a function that invokes `iteratees` with the arguments it receives | ||
* and returns their results. | ||
* | ||
@@ -13,3 +13,3 @@ * @static | ||
* @category Util | ||
* @param {...(Function|Function[])} iteratees The iteratees to invoke. | ||
* @param {...Function} iteratees The iteratees to invoke. | ||
* @returns {Function} Returns the new function. | ||
@@ -16,0 +16,0 @@ * @example |
import apply from './_apply'; | ||
import arrayMap from './_arrayMap'; | ||
import baseFlatten from './_baseFlatten'; | ||
import baseIteratee from './_baseIteratee'; | ||
@@ -19,3 +18,3 @@ import rest from './rest'; | ||
* @param {Function} func The function to wrap. | ||
* @param {...(Function|Function[])} [transforms] The functions to transform | ||
* @param {...Function} [transforms] The functions to transform | ||
* arguments, specified individually or in arrays. | ||
@@ -44,3 +43,3 @@ * @returns {Function} Returns the new function. | ||
var overArgs = rest(function(func, transforms) { | ||
transforms = arrayMap(baseFlatten(transforms, 1), baseIteratee); | ||
transforms = arrayMap(transforms, baseIteratee); | ||
@@ -47,0 +46,0 @@ var funcsLength = transforms.length; |
@@ -6,3 +6,3 @@ import arrayEvery from './_arrayEvery'; | ||
* Creates a function that checks if **all** of the `predicates` return | ||
* truthy when invoked with the arguments provided to the created function. | ||
* truthy when invoked with the arguments it receives. | ||
* | ||
@@ -13,3 +13,3 @@ * @static | ||
* @category Util | ||
* @param {...(Function|Function[])} predicates The predicates to check. | ||
* @param {...Function} predicates The predicates to check. | ||
* @returns {Function} Returns the new function. | ||
@@ -16,0 +16,0 @@ * @example |
@@ -6,3 +6,3 @@ import arraySome from './_arraySome'; | ||
* Creates a function that checks if **any** of the `predicates` return | ||
* truthy when invoked with the arguments provided to the created function. | ||
* truthy when invoked with the arguments it receives. | ||
* | ||
@@ -13,3 +13,3 @@ * @static | ||
* @category Util | ||
* @param {...(Function|Function[])} predicates The predicates to check. | ||
* @param {...Function} predicates The predicates to check. | ||
* @returns {Function} Returns the new function. | ||
@@ -16,0 +16,0 @@ * @example |
{ | ||
"name": "lodash-es", | ||
"version": "4.7.0", | ||
"version": "4.8.0", | ||
"description": "Lodash exported as ES modules.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/custom-builds", |
@@ -10,5 +10,5 @@ import createWrapper from './_createWrapper'; | ||
/** | ||
* Creates a function that invokes `func` with `partial` arguments prepended | ||
* to those provided to the new function. This method is like `_.bind` except | ||
* it does **not** alter the `this` binding. | ||
* Creates a function that invokes `func` with `partials` prepended to the | ||
* arguments it receives. This method is like `_.bind` except it does **not** | ||
* alter the `this` binding. | ||
* | ||
@@ -15,0 +15,0 @@ * The `_.partial.placeholder` value, which defaults to `_` in monolithic |
@@ -11,3 +11,3 @@ import createWrapper from './_createWrapper'; | ||
* This method is like `_.partial` except that partially applied arguments | ||
* are appended to those provided to the new function. | ||
* are appended to the arguments it receives. | ||
* | ||
@@ -14,0 +14,0 @@ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic |
@@ -1,4 +0,4 @@ | ||
# lodash-es v4.7.0 | ||
# lodash-es v4.8.0 | ||
The [lodash](https://lodash.com/) library exported as [ES](http://www.ecma-international.org/ecma-262/6.0/) modules. | ||
The [Lodash](https://lodash.com/) library exported as [ES](http://www.ecma-international.org/ecma-262/6.0/) modules. | ||
@@ -10,2 +10,2 @@ Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): | ||
See the [package source](https://github.com/lodash/lodash/tree/4.7.0-es) for more details. | ||
See the [package source](https://github.com/lodash/lodash/tree/4.8.0-es) for more details. |
@@ -10,3 +10,3 @@ import baseFlatten from './_baseFlatten'; | ||
* Creates a function that invokes `func` with arguments arranged according | ||
* to the specified indexes where the argument value at the first index is | ||
* to the specified `indexes` where the argument value at the first index is | ||
* provided as the first argument, the argument value at the second index is | ||
@@ -13,0 +13,0 @@ * provided as the second argument, and so on. |
@@ -9,3 +9,3 @@ import arrayReduce from './_arrayReduce'; | ||
* Reduces `collection` to a value which is the accumulated result of running | ||
* each element in `collection` through `iteratee`, where each successive | ||
* each element in `collection` thru `iteratee`, where each successive | ||
* invocation is supplied the return value of the previous. If `accumulator` | ||
@@ -12,0 +12,0 @@ * is not given the first element of `collection` is used as the initial |
import baseRepeat from './_baseRepeat'; | ||
import isIterateeCall from './_isIterateeCall'; | ||
import toInteger from './toInteger'; | ||
@@ -13,3 +14,4 @@ import toString from './toString'; | ||
* @param {string} [string=''] The string to repeat. | ||
* @param {number} [n=0] The number of times to repeat the string. | ||
* @param {number} [n=1] The number of times to repeat the string. | ||
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. | ||
* @returns {string} Returns the repeated string. | ||
@@ -27,6 +29,11 @@ * @example | ||
*/ | ||
function repeat(string, n) { | ||
return baseRepeat(toString(string), toInteger(n)); | ||
function repeat(string, n, guard) { | ||
if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { | ||
n = 1; | ||
} else { | ||
n = toInteger(n); | ||
} | ||
return baseRepeat(toString(string), n); | ||
} | ||
export default repeat; |
import baseClamp from './_baseClamp'; | ||
import baseRandom from './_baseRandom'; | ||
import isIterateeCall from './_isIterateeCall'; | ||
import toArray from './toArray'; | ||
@@ -15,3 +16,4 @@ import toInteger from './toInteger'; | ||
* @param {Array|Object} collection The collection to sample. | ||
* @param {number} [n=0] The number of elements to sample. | ||
* @param {number} [n=1] The number of elements to sample. | ||
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. | ||
* @returns {Array} Returns the random elements. | ||
@@ -26,3 +28,3 @@ * @example | ||
*/ | ||
function sampleSize(collection, n) { | ||
function sampleSize(collection, n, guard) { | ||
var index = -1, | ||
@@ -33,3 +35,7 @@ result = toArray(collection), | ||
n = baseClamp(toInteger(n), 0, length); | ||
if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { | ||
n = 1; | ||
} else { | ||
n = baseClamp(toInteger(n), 0, length); | ||
} | ||
while (++index < n) { | ||
@@ -36,0 +42,0 @@ var rand = baseRandom(index, lastIndex), |
@@ -27,3 +27,3 @@ import baseSet from './_baseSet'; | ||
* | ||
* _.set(object, 'x[0].y.z', 5); | ||
* _.set(object, ['x', '0', 'y', 'z'], 5); | ||
* console.log(object.x[0].y.z); | ||
@@ -30,0 +30,0 @@ * // => 5 |
@@ -8,3 +8,3 @@ import baseFlatten from './_baseFlatten'; | ||
* Creates an array of elements, sorted in ascending order by the results of | ||
* running each element in a collection through each iteratee. This method | ||
* running each element in a collection thru each iteratee. This method | ||
* performs a stable sort, that is, it preserves the original sort order of | ||
@@ -11,0 +11,0 @@ * equal elements. The iteratees are invoked with one argument: (value). |
@@ -15,3 +15,3 @@ import apply from './_apply'; | ||
* create function and an array of arguments much like | ||
* [`Function#apply`](https://es5.github.io/#x15.3.4.3). | ||
* [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply). | ||
* | ||
@@ -18,0 +18,0 @@ * **Note:** This method is based on the |
@@ -18,3 +18,6 @@ import assignInDefaults from './_assignInDefaults'; | ||
/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */ | ||
/** | ||
* Used to match | ||
* [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). | ||
*/ | ||
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; | ||
@@ -21,0 +24,0 @@ |
@@ -58,3 +58,3 @@ import isFunction from './isFunction'; | ||
if (typeof value != 'string') { | ||
return value === 0 ? value : +value; | ||
return value === 0 ? value : +value; | ||
} | ||
@@ -61,0 +61,0 @@ value = value.replace(reTrim, ''); |
@@ -13,7 +13,7 @@ import arrayEach from './_arrayEach'; | ||
* An alternative to `_.reduce`; this method transforms `object` to a new | ||
* `accumulator` object which is the result of running each of its own enumerable | ||
* string keyed properties through `iteratee`, with each invocation potentially | ||
* mutating the `accumulator` object. The iteratee is invoked with four arguments: | ||
* (accumulator, value, key, object). Iteratee functions may exit iteration | ||
* early by explicitly returning `false`. | ||
* `accumulator` object which is the result of running each of its own | ||
* enumerable string keyed properties thru `iteratee`, with each invocation | ||
* potentially mutating the `accumulator` object. The iteratee is invoked | ||
* with four arguments: (accumulator, value, key, object). Iteratee functions | ||
* may exit iteration early by explicitly returning `false`. | ||
* | ||
@@ -20,0 +20,0 @@ * @static |
@@ -24,3 +24,3 @@ import baseUnset from './_baseUnset'; | ||
* | ||
* _.unset(object, 'a[0].b.c'); | ||
* _.unset(object, ['a', '0', 'b', 'c']); | ||
* // => true | ||
@@ -27,0 +27,0 @@ * |
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
574824
569
18190