From 3b6af7b0a35995f8aafb8e5a1bb2c6aac13f58ba Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 15 Feb 2016 12:01:21 -0800 Subject: [PATCH] Bump to v4.2.1. --- README.md | 2 +- lodash._baseflatten/README.md | 4 +- lodash._baseflatten/index.js | 6 +- lodash._baseflatten/package.json | 2 +- lodash._basepullat/README.md | 4 +- lodash._basepullat/index.js | 2 +- lodash._basepullat/package.json | 6 +- lodash._baseset/README.md | 4 +- lodash._baseset/index.js | 26 ++-- lodash._baseset/package.json | 2 +- lodash.bind/README.md | 4 +- lodash.bind/index.js | 26 ++-- lodash.bind/package.json | 2 +- lodash.bindall/README.md | 4 +- lodash.bindall/index.js | 85 ++++++++++++- lodash.bindall/package.json | 2 +- lodash.bindkey/README.md | 4 +- lodash.bindkey/index.js | 26 ++-- lodash.bindkey/package.json | 2 +- lodash.capitalize/README.md | 4 +- lodash.capitalize/index.js | 45 ++++++- lodash.capitalize/package.json | 2 +- lodash.cond/README.md | 4 +- lodash.cond/index.js | 2 +- lodash.cond/package.json | 6 +- lodash.countby/README.md | 4 +- lodash.countby/index.js | 2 +- lodash.countby/package.json | 8 +- lodash.differenceby/README.md | 4 +- lodash.differenceby/index.js | 12 +- lodash.differenceby/package.json | 4 +- lodash.droprightwhile/README.md | 4 +- lodash.droprightwhile/index.js | 2 +- lodash.droprightwhile/package.json | 8 +- lodash.dropwhile/README.md | 4 +- lodash.dropwhile/index.js | 2 +- lodash.dropwhile/package.json | 8 +- lodash.endswith/README.md | 4 +- lodash.endswith/index.js | 39 +----- lodash.endswith/package.json | 2 +- lodash.every/README.md | 4 +- lodash.every/index.js | 9 +- lodash.every/package.json | 4 +- lodash.filter/README.md | 4 +- lodash.filter/index.js | 6 +- lodash.filter/package.json | 4 +- lodash.find/README.md | 4 +- lodash.find/index.js | 2 +- lodash.find/package.json | 12 +- lodash.findindex/README.md | 4 +- lodash.findindex/index.js | 2 +- lodash.findindex/package.json | 8 +- lodash.findkey/README.md | 4 +- lodash.findkey/index.js | 2 +- lodash.findkey/package.json | 10 +- lodash.findlast/README.md | 4 +- lodash.findlast/index.js | 2 +- lodash.findlast/package.json | 12 +- lodash.findlastindex/README.md | 4 +- lodash.findlastindex/index.js | 2 +- lodash.findlastindex/package.json | 8 +- lodash.flatmap/README.md | 4 +- lodash.flatmap/index.js | 12 +- lodash.flatmap/package.json | 6 +- lodash.flip/README.md | 4 +- lodash.flip/index.js | 26 ++-- lodash.flip/package.json | 2 +- lodash.foreach/README.md | 4 +- lodash.foreach/index.js | 8 +- lodash.foreach/package.json | 2 +- lodash.forinright/README.md | 4 +- lodash.forinright/index.js | 5 +- lodash.forinright/package.json | 2 +- lodash.forownright/README.md | 4 +- lodash.forownright/index.js | 5 +- lodash.forownright/package.json | 2 +- lodash.get/README.md | 4 +- lodash.get/index.js | 26 ++-- lodash.get/package.json | 2 +- lodash.groupby/README.md | 4 +- lodash.groupby/index.js | 2 +- lodash.groupby/package.json | 8 +- lodash.has/README.md | 4 +- lodash.has/index.js | 9 +- lodash.has/package.json | 4 +- lodash.hasin/README.md | 4 +- lodash.hasin/index.js | 9 +- lodash.hasin/package.json | 4 +- lodash.intersectionby/README.md | 4 +- lodash.intersectionby/index.js | 14 +-- lodash.intersectionby/package.json | 4 +- lodash.invertby/LICENSE | 33 ++--- lodash.invertby/README.md | 4 +- lodash.invertby/index.js | 110 +---------------- lodash.invertby/package.json | 6 +- lodash.invoke/README.md | 4 +- lodash.invoke/index.js | 2 +- lodash.invoke/package.json | 6 +- lodash.invokemap/README.md | 4 +- lodash.invokemap/index.js | 9 +- lodash.invokemap/package.json | 4 +- lodash.isempty/README.md | 4 +- lodash.isempty/index.js | 61 +++++++--- lodash.isempty/package.json | 2 +- lodash.keyby/README.md | 4 +- lodash.keyby/index.js | 2 +- lodash.keyby/package.json | 8 +- lodash.map/README.md | 4 +- lodash.map/index.js | 9 +- lodash.map/package.json | 4 +- lodash.mapkeys/README.md | 4 +- lodash.mapkeys/index.js | 2 +- lodash.mapkeys/package.json | 8 +- lodash.mapvalues/README.md | 4 +- lodash.mapvalues/index.js | 2 +- lodash.mapvalues/package.json | 8 +- lodash.maxby/README.md | 4 +- lodash.maxby/index.js | 2 +- lodash.maxby/package.json | 6 +- lodash.method/README.md | 4 +- lodash.method/index.js | 2 +- lodash.method/package.json | 6 +- lodash.methodof/README.md | 4 +- lodash.methodof/index.js | 2 +- lodash.methodof/package.json | 6 +- lodash.minby/README.md | 4 +- lodash.minby/index.js | 2 +- lodash.minby/package.json | 6 +- lodash.ntharg/README.md | 4 +- lodash.ntharg/index.js | 37 +----- lodash.ntharg/package.json | 2 +- lodash.omit/README.md | 4 +- lodash.omit/index.js | 29 +++-- lodash.omit/package.json | 2 +- lodash.omitby/README.md | 4 +- lodash.omitby/index.js | 11 +- lodash.omitby/package.json | 2 +- lodash.orderby/README.md | 4 +- lodash.orderby/index.js | 23 ++-- lodash.orderby/package.json | 4 +- lodash.over/README.md | 4 +- lodash.over/index.js | 2 +- lodash.over/package.json | 8 +- lodash.overargs/README.md | 4 +- lodash.overargs/index.js | 2 +- lodash.overargs/package.json | 8 +- lodash.overevery/README.md | 4 +- lodash.overevery/index.js | 2 +- lodash.overevery/package.json | 8 +- lodash.oversome/README.md | 4 +- lodash.oversome/index.js | 2 +- lodash.oversome/package.json | 8 +- lodash.partial/README.md | 4 +- lodash.partial/index.js | 26 ++-- lodash.partial/package.json | 2 +- lodash.partialright/README.md | 4 +- lodash.partialright/index.js | 26 ++-- lodash.partialright/package.json | 2 +- lodash.partition/README.md | 4 +- lodash.partition/index.js | 2 +- lodash.partition/package.json | 8 +- lodash.pick/README.md | 4 +- lodash.pick/index.js | 106 +++++++++++++++- lodash.pick/package.json | 2 +- lodash.pickby/README.md | 4 +- lodash.pickby/index.js | 4 +- lodash.pickby/package.json | 2 +- lodash.property/README.md | 4 +- lodash.property/index.js | 26 ++-- lodash.property/package.json | 2 +- lodash.propertyof/README.md | 4 +- lodash.propertyof/index.js | 26 ++-- lodash.propertyof/package.json | 2 +- lodash.reduce/README.md | 4 +- lodash.reduce/index.js | 2 +- lodash.reduce/package.json | 10 +- lodash.reduceright/README.md | 4 +- lodash.reduceright/index.js | 2 +- lodash.reduceright/package.json | 10 +- lodash.reject/README.md | 4 +- lodash.reject/index.js | 6 +- lodash.reject/package.json | 4 +- lodash.remove/README.md | 4 +- lodash.remove/index.js | 2 +- lodash.remove/package.json | 8 +- lodash.result/README.md | 4 +- lodash.result/index.js | 2 +- lodash.result/package.json | 6 +- lodash.sample/README.md | 4 +- lodash.sample/index.js | 168 +++++++------------------- lodash.sample/package.json | 2 +- lodash.some/README.md | 4 +- lodash.some/index.js | 9 +- lodash.some/package.json | 4 +- lodash.sortby/README.md | 4 +- lodash.sortby/index.js | 23 ++-- lodash.sortby/package.json | 4 +- lodash.sortedindexby/README.md | 4 +- lodash.sortedindexby/index.js | 2 +- lodash.sortedindexby/package.json | 8 +- lodash.sortedlastindexby/README.md | 4 +- lodash.sortedlastindexby/index.js | 2 +- lodash.sortedlastindexby/package.json | 8 +- lodash.sorteduniqby/README.md | 4 +- lodash.sorteduniqby/index.js | 2 +- lodash.sorteduniqby/package.json | 8 +- lodash.split/README.md | 4 +- lodash.split/index.js | 10 +- lodash.split/package.json | 2 +- lodash.spread/README.md | 4 +- lodash.spread/index.js | 39 +----- lodash.spread/package.json | 2 +- lodash.startcase/README.md | 4 +- lodash.startcase/index.js | 10 +- lodash.startcase/package.json | 2 +- lodash.startswith/README.md | 4 +- lodash.startswith/index.js | 39 +----- lodash.startswith/package.json | 2 +- lodash.sumby/README.md | 4 +- lodash.sumby/index.js | 2 +- lodash.sumby/package.json | 6 +- lodash.takerightwhile/README.md | 4 +- lodash.takerightwhile/index.js | 2 +- lodash.takerightwhile/package.json | 8 +- lodash.takewhile/README.md | 4 +- lodash.takewhile/index.js | 2 +- lodash.takewhile/package.json | 8 +- lodash.template/README.md | 4 +- lodash.template/index.js | 5 +- lodash.template/package.json | 2 +- lodash.toarray/README.md | 4 +- lodash.toarray/index.js | 11 +- lodash.toarray/package.json | 4 +- lodash.transform/README.md | 4 +- lodash.transform/index.js | 11 +- lodash.transform/package.json | 2 +- lodash.unary/README.md | 4 +- lodash.unary/index.js | 26 ++-- lodash.unary/package.json | 2 +- lodash.union/README.md | 4 +- lodash.union/index.js | 3 +- lodash.union/package.json | 8 +- lodash.unionby/README.md | 4 +- lodash.unionby/index.js | 9 +- lodash.unionby/package.json | 4 +- lodash.unionwith/README.md | 4 +- lodash.unionwith/index.js | 9 +- lodash.unionwith/package.json | 4 +- lodash.uniq/README.md | 4 +- lodash.uniq/index.js | 7 +- lodash.uniq/package.json | 6 +- lodash.uniqby/README.md | 4 +- lodash.uniqby/index.js | 2 +- lodash.uniqby/package.json | 8 +- lodash.uniqwith/README.md | 4 +- lodash.uniqwith/index.js | 3 +- lodash.uniqwith/package.json | 6 +- lodash.unset/README.md | 4 +- lodash.unset/index.js | 9 +- lodash.unset/package.json | 4 +- lodash.xor/README.md | 4 +- lodash.xor/index.js | 16 +-- lodash.xor/package.json | 4 +- lodash.xorby/README.md | 4 +- lodash.xorby/index.js | 15 ++- lodash.xorby/package.json | 4 +- lodash.xorwith/README.md | 4 +- lodash.xorwith/index.js | 13 +- lodash.xorwith/package.json | 4 +- 269 files changed, 1098 insertions(+), 1145 deletions(-) diff --git a/README.md b/README.md index 56f0627b9..3b70ae833 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v4.2.0 +# lodash v4.2.1 The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method. diff --git a/lodash._baseflatten/README.md b/lodash._baseflatten/README.md index bfa8eb7f4..2c839ab72 100644 --- a/lodash._baseflatten/README.md +++ b/lodash._baseflatten/README.md @@ -1,4 +1,4 @@ -# lodash._baseflatten v4.2.0 +# lodash._baseflatten v4.2.1 The internal [lodash](https://lodash.com/) function `baseFlatten` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var baseFlatten = require('lodash._baseflatten'); ``` -See the [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash._baseflatten) for more details. +See the [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash._baseflatten) for more details. diff --git a/lodash._baseflatten/index.js b/lodash._baseflatten/index.js index 0daaa0162..de0df103f 100644 --- a/lodash._baseflatten/index.js +++ b/lodash._baseflatten/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -89,7 +89,7 @@ function baseFlatten(array, depth, predicate, isStrict, result) { * * @private * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { @@ -118,7 +118,7 @@ var getLength = baseProperty('length'); * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { - return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); + return isArray(value) || isArguments(value); } /** diff --git a/lodash._baseflatten/package.json b/lodash._baseflatten/package.json index 7f8f55250..c2727b4fa 100644 --- a/lodash._baseflatten/package.json +++ b/lodash._baseflatten/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseflatten", - "version": "4.2.0", + "version": "4.2.1", "description": "The internal lodash function `baseFlatten` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._basepullat/README.md b/lodash._basepullat/README.md index 3dda9ec9c..5f230e933 100644 --- a/lodash._basepullat/README.md +++ b/lodash._basepullat/README.md @@ -1,4 +1,4 @@ -# lodash._basepullat v4.2.0 +# lodash._basepullat v4.2.1 The internal [lodash](https://lodash.com/) function `basePullAt` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var basePullAt = require('lodash._basepullat'); ``` -See the [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash._basepullat) for more details. +See the [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash._basepullat) for more details. diff --git a/lodash._basepullat/index.js b/lodash._basepullat/index.js index 01f75f45a..7fa90e591 100644 --- a/lodash._basepullat/index.js +++ b/lodash._basepullat/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash._basepullat/package.json b/lodash._basepullat/package.json index 58b4395da..b8f9a8b24 100644 --- a/lodash._basepullat/package.json +++ b/lodash._basepullat/package.json @@ -1,6 +1,6 @@ { "name": "lodash._basepullat", - "version": "4.2.0", + "version": "4.2.1", "description": "The internal lodash function `basePullAt` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -8,13 +8,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseslice": "^4.0.0", + "lodash._baseslice": "~4.0.0", "lodash.tostring": "^4.0.0" } } diff --git a/lodash._baseset/README.md b/lodash._baseset/README.md index f4af39063..04d61b524 100644 --- a/lodash._baseset/README.md +++ b/lodash._baseset/README.md @@ -1,4 +1,4 @@ -# lodash._baseset v4.2.0 +# lodash._baseset v4.2.1 The internal [lodash](https://lodash.com/) function `baseSet` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var baseSet = require('lodash._baseset'); ``` -See the [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash._baseset) for more details. +See the [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash._baseset) for more details. diff --git a/lodash._baseset/index.js b/lodash._baseset/index.js index d0870e759..759e4300e 100644 --- a/lodash._baseset/index.js +++ b/lodash._baseset/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -66,17 +66,6 @@ function assignValue(object, key, value) { } } -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast property path array. - */ -function baseCastPath(value) { - return isArray(value) ? value : stringToPath(value); -} - /** * The base implementation of `_.set`. * @@ -88,7 +77,7 @@ function baseCastPath(value) { * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { - path = isKey(path, object) ? [path] : baseCastPath(path); + path = isKey(path, object) ? [path] : castPath(path); var index = -1, length = path.length, @@ -115,6 +104,17 @@ function baseSet(object, path, value, customizer) { return object; } +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + /** * Checks if `value` is a property name and not a property path. * diff --git a/lodash._baseset/package.json b/lodash._baseset/package.json index 2f4644ac8..6c11e8035 100644 --- a/lodash._baseset/package.json +++ b/lodash._baseset/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseset", - "version": "4.2.0", + "version": "4.2.1", "description": "The internal lodash function `baseSet` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.bind/README.md b/lodash.bind/README.md index 6e597314e..670150ae1 100644 --- a/lodash.bind/README.md +++ b/lodash.bind/README.md @@ -1,4 +1,4 @@ -# lodash.bind v4.2.0 +# lodash.bind v4.2.1 The [lodash](https://lodash.com/) method `_.bind` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var bind = require('lodash.bind'); ``` -See the [documentation](https://lodash.com/docs#bind) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.bind) for more details. +See the [documentation](https://lodash.com/docs#bind) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.bind) for more details. diff --git a/lodash.bind/index.js b/lodash.bind/index.js index cce303885..3d482467e 100644 --- a/lodash.bind/index.js +++ b/lodash.bind/index.js @@ -51,7 +51,7 @@ var funcTag = '[object Function]', /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; @@ -136,7 +136,7 @@ function arrayEach(array, iteratee) { * specifying an index to search from. * * @private - * @param {Array} [array] The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ @@ -150,7 +150,7 @@ function arrayIncludes(array, value) { * support for iteratee shorthands. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. @@ -172,7 +172,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) { * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -280,7 +280,8 @@ function replaceHolders(array, placeholder) { } /** Used for built-in method references. */ -var objectProto = Object.prototype; +var funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; @@ -292,14 +293,14 @@ var maskSrcKey = (function() { }()); /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -505,7 +506,7 @@ function createBind(func, bitmask, thisArg) { function createCtor(Ctor) { 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 + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -1005,15 +1006,14 @@ var bind = baseRest(function(func, thisArg, partials) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -1130,7 +1130,7 @@ function toFinite(value) { * Converts `value` to an integer. * * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -1190,7 +1190,7 @@ function toNumber(value) { return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { diff --git a/lodash.bind/package.json b/lodash.bind/package.json index 67a6ea112..ec89d5d80 100644 --- a/lodash.bind/package.json +++ b/lodash.bind/package.json @@ -1,6 +1,6 @@ { "name": "lodash.bind", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.bind` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.bindall/README.md b/lodash.bindall/README.md index 3d51925ed..62a1d0cba 100644 --- a/lodash.bindall/README.md +++ b/lodash.bindall/README.md @@ -1,4 +1,4 @@ -# lodash.bindall v4.2.0 +# lodash.bindall v4.2.1 The [lodash](https://lodash.com/) method `_.bindAll` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var bindAll = require('lodash.bindall'); ``` -See the [documentation](https://lodash.com/docs#bindAll) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.bindall) for more details. +See the [documentation](https://lodash.com/docs#bindAll) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.bindall) for more details. diff --git a/lodash.bindall/index.js b/lodash.bindall/index.js index fa3ac51da..c47f49ccd 100644 --- a/lodash.bindall/index.js +++ b/lodash.bindall/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -10,6 +10,12 @@ var baseFlatten = require('lodash._baseflatten'), bind = require('lodash.bind'), rest = require('lodash.rest'); +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. @@ -31,6 +37,82 @@ function arrayEach(array, iteratee) { return array; } +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + /** * Binds methods of an object to the object itself, overwriting the existing * method. @@ -59,6 +141,7 @@ function arrayEach(array, iteratee) { */ var bindAll = rest(function(object, methodNames) { arrayEach(baseFlatten(methodNames, 1), function(key) { + key = toKey(key); object[key] = bind(object[key], object); }); return object; diff --git a/lodash.bindall/package.json b/lodash.bindall/package.json index fcdca1e8e..2359e2962 100644 --- a/lodash.bindall/package.json +++ b/lodash.bindall/package.json @@ -1,6 +1,6 @@ { "name": "lodash.bindall", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.bindAll` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.bindkey/README.md b/lodash.bindkey/README.md index bd10048bd..f602a3b3e 100644 --- a/lodash.bindkey/README.md +++ b/lodash.bindkey/README.md @@ -1,4 +1,4 @@ -# lodash.bindkey v4.2.0 +# lodash.bindkey v4.2.1 The [lodash](https://lodash.com/) method `_.bindKey` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var bindKey = require('lodash.bindkey'); ``` -See the [documentation](https://lodash.com/docs#bindKey) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.bindkey) for more details. +See the [documentation](https://lodash.com/docs#bindKey) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.bindkey) for more details. diff --git a/lodash.bindkey/index.js b/lodash.bindkey/index.js index 0bed7c1b4..9533b7d40 100644 --- a/lodash.bindkey/index.js +++ b/lodash.bindkey/index.js @@ -51,7 +51,7 @@ var funcTag = '[object Function]', /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; @@ -136,7 +136,7 @@ function arrayEach(array, iteratee) { * specifying an index to search from. * * @private - * @param {Array} [array] The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ @@ -150,7 +150,7 @@ function arrayIncludes(array, value) { * support for iteratee shorthands. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. @@ -172,7 +172,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) { * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -280,7 +280,8 @@ function replaceHolders(array, placeholder) { } /** Used for built-in method references. */ -var objectProto = Object.prototype; +var funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; @@ -292,14 +293,14 @@ var maskSrcKey = (function() { }()); /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -505,7 +506,7 @@ function createBind(func, bitmask, thisArg) { function createCtor(Ctor) { 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 + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -1015,15 +1016,14 @@ var bindKey = baseRest(function(object, key, partials) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -1140,7 +1140,7 @@ function toFinite(value) { * Converts `value` to an integer. * * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -1200,7 +1200,7 @@ function toNumber(value) { return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { diff --git a/lodash.bindkey/package.json b/lodash.bindkey/package.json index b2722daca..dc487f6c6 100644 --- a/lodash.bindkey/package.json +++ b/lodash.bindkey/package.json @@ -1,6 +1,6 @@ { "name": "lodash.bindkey", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.bindKey` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.capitalize/README.md b/lodash.capitalize/README.md index 49526d0a4..c4bdb307a 100644 --- a/lodash.capitalize/README.md +++ b/lodash.capitalize/README.md @@ -1,4 +1,4 @@ -# lodash.capitalize v4.2.0 +# lodash.capitalize v4.2.1 The [lodash](https://lodash.com/) method `_.capitalize` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var capitalize = require('lodash.capitalize'); ``` -See the [documentation](https://lodash.com/docs#capitalize) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.capitalize) for more details. +See the [documentation](https://lodash.com/docs#capitalize) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.capitalize) for more details. diff --git a/lodash.capitalize/index.js b/lodash.capitalize/index.js index d8f73438a..978293e0d 100644 --- a/lodash.capitalize/index.js +++ b/lodash.capitalize/index.js @@ -37,10 +37,10 @@ var reOptMod = rsModifier + '?', rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); +var reUnicode = 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 + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; @@ -51,6 +51,28 @@ var freeSelf = typeof self == 'object' && self && self.Object === Object && self /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + /** * Converts `string` to an array. * @@ -59,7 +81,20 @@ var root = freeGlobal || freeSelf || Function('return this')(); * @returns {Array} Returns the converted array. */ function stringToArray(string) { - return string.match(reComplexSymbol); + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; } /** Used for built-in method references. */ @@ -67,7 +102,7 @@ var objectProto = Object.prototype; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -155,7 +190,7 @@ function createCaseFirst(methodName) { return function(string) { string = toString(string); - var strSymbols = reHasComplexSymbol.test(string) + var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; diff --git a/lodash.capitalize/package.json b/lodash.capitalize/package.json index cd5faac3e..378eb3faf 100644 --- a/lodash.capitalize/package.json +++ b/lodash.capitalize/package.json @@ -1,6 +1,6 @@ { "name": "lodash.capitalize", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.capitalize` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.cond/README.md b/lodash.cond/README.md index 13e879569..d42bf1d3b 100644 --- a/lodash.cond/README.md +++ b/lodash.cond/README.md @@ -1,4 +1,4 @@ -# lodash.cond v4.2.0 +# lodash.cond v4.2.1 The [lodash](https://lodash.com/) method `_.cond` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var cond = require('lodash.cond'); ``` -See the [documentation](https://lodash.com/docs#cond) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.cond) for more details. +See the [documentation](https://lodash.com/docs#cond) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.cond) for more details. diff --git a/lodash.cond/index.js b/lodash.cond/index.js index d1df773f4..9def39305 100644 --- a/lodash.cond/index.js +++ b/lodash.cond/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.cond/package.json b/lodash.cond/package.json index 1001e464a..6aa45e7c4 100644 --- a/lodash.cond/package.json +++ b/lodash.cond/package.json @@ -1,6 +1,6 @@ { "name": "lodash.cond", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.cond` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0", + "lodash._baseiteratee": "~4.5.0", "lodash.rest": "^4.0.0" } } diff --git a/lodash.countby/README.md b/lodash.countby/README.md index fcd184551..3a896a701 100644 --- a/lodash.countby/README.md +++ b/lodash.countby/README.md @@ -1,4 +1,4 @@ -# lodash.countby v4.2.0 +# lodash.countby v4.2.1 The [lodash](https://lodash.com/) method `_.countBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var countBy = require('lodash.countby'); ``` -See the [documentation](https://lodash.com/docs#countBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.countby) for more details. +See the [documentation](https://lodash.com/docs#countBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.countby) for more details. diff --git a/lodash.countby/index.js b/lodash.countby/index.js index 2075928be..83a8e6a10 100644 --- a/lodash.countby/index.js +++ b/lodash.countby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.countby/package.json b/lodash.countby/package.json index 6c4ab24a5..68c3303fb 100644 --- a/lodash.countby/package.json +++ b/lodash.countby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.countby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.countBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseeach": "^4.0.0", - "lodash._baseiteratee": "^4.0.0" + "lodash._baseeach": "~4.1.0", + "lodash._baseiteratee": "~4.5.0" } } diff --git a/lodash.differenceby/README.md b/lodash.differenceby/README.md index 0c898a02c..7bde26b77 100644 --- a/lodash.differenceby/README.md +++ b/lodash.differenceby/README.md @@ -1,4 +1,4 @@ -# lodash.differenceby v4.2.0 +# lodash.differenceby v4.2.1 The [lodash](https://lodash.com/) method `_.differenceBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var differenceBy = require('lodash.differenceby'); ``` -See the [documentation](https://lodash.com/docs#differenceBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.differenceby) for more details. +See the [documentation](https://lodash.com/docs#differenceBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.differenceby) for more details. diff --git a/lodash.differenceby/index.js b/lodash.differenceby/index.js index 1f685c2da..4998d9cd6 100644 --- a/lodash.differenceby/index.js +++ b/lodash.differenceby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -55,7 +55,8 @@ var getLength = baseProperty('length'); /** * This method is like `_.difference` except that it accepts `iteratee` which * is invoked for each element of `array` and `values` to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * by which they're compared. Result values are chosen from the first array. + * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ @@ -126,8 +127,7 @@ function last(array) { * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -175,8 +175,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.differenceby/package.json b/lodash.differenceby/package.json index 1b20f6108..b4f76ba3d 100644 --- a/lodash.differenceby/package.json +++ b/lodash.differenceby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.differenceby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.differenceBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.droprightwhile/README.md b/lodash.droprightwhile/README.md index f40eadbf4..fe417bcda 100644 --- a/lodash.droprightwhile/README.md +++ b/lodash.droprightwhile/README.md @@ -1,4 +1,4 @@ -# lodash.droprightwhile v4.2.0 +# lodash.droprightwhile v4.2.1 The [lodash](https://lodash.com/) method `_.dropRightWhile` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var dropRightWhile = require('lodash.droprightwhile'); ``` -See the [documentation](https://lodash.com/docs#dropRightWhile) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.droprightwhile) for more details. +See the [documentation](https://lodash.com/docs#dropRightWhile) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.droprightwhile) for more details. diff --git a/lodash.droprightwhile/index.js b/lodash.droprightwhile/index.js index 611ecd5a5..8993657b9 100644 --- a/lodash.droprightwhile/index.js +++ b/lodash.droprightwhile/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.droprightwhile/package.json b/lodash.droprightwhile/package.json index f9e8fc406..13e1715b9 100644 --- a/lodash.droprightwhile/package.json +++ b/lodash.droprightwhile/package.json @@ -1,6 +1,6 @@ { "name": "lodash.droprightwhile", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.dropRightWhile` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0", - "lodash._baseslice": "^4.0.0" + "lodash._baseiteratee": "~4.5.0", + "lodash._baseslice": "~4.0.0" } } diff --git a/lodash.dropwhile/README.md b/lodash.dropwhile/README.md index 353ba6f5a..ad15ce25b 100644 --- a/lodash.dropwhile/README.md +++ b/lodash.dropwhile/README.md @@ -1,4 +1,4 @@ -# lodash.dropwhile v4.2.0 +# lodash.dropwhile v4.2.1 The [lodash](https://lodash.com/) method `_.dropWhile` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var dropWhile = require('lodash.dropwhile'); ``` -See the [documentation](https://lodash.com/docs#dropWhile) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.dropwhile) for more details. +See the [documentation](https://lodash.com/docs#dropWhile) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.dropwhile) for more details. diff --git a/lodash.dropwhile/index.js b/lodash.dropwhile/index.js index 302f7d6ac..a03e58e6b 100644 --- a/lodash.dropwhile/index.js +++ b/lodash.dropwhile/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.dropwhile/package.json b/lodash.dropwhile/package.json index 484afa518..8661173ab 100644 --- a/lodash.dropwhile/package.json +++ b/lodash.dropwhile/package.json @@ -1,6 +1,6 @@ { "name": "lodash.dropwhile", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.dropWhile` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0", - "lodash._baseslice": "^4.0.0" + "lodash._baseiteratee": "~4.5.0", + "lodash._baseslice": "~4.0.0" } } diff --git a/lodash.endswith/README.md b/lodash.endswith/README.md index 1c38faf14..370c9acc2 100644 --- a/lodash.endswith/README.md +++ b/lodash.endswith/README.md @@ -1,4 +1,4 @@ -# lodash.endswith v4.2.0 +# lodash.endswith v4.2.1 The [lodash](https://lodash.com/) method `_.endsWith` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var endsWith = require('lodash.endswith'); ``` -See the [documentation](https://lodash.com/docs#endsWith) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.endswith) for more details. +See the [documentation](https://lodash.com/docs#endsWith) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.endswith) for more details. diff --git a/lodash.endswith/index.js b/lodash.endswith/index.js index 48e73493e..72b2a1ad8 100644 --- a/lodash.endswith/index.js +++ b/lodash.endswith/index.js @@ -13,9 +13,7 @@ var INFINITY = 1 / 0, NAN = 0 / 0; /** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - symbolTag = '[object Symbol]'; +var symbolTag = '[object Symbol]'; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; @@ -46,7 +44,7 @@ var objectProto = Object.prototype; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -99,34 +97,9 @@ function baseToString(value) { return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -243,7 +216,7 @@ function toFinite(value) { * Converts `value` to an integer. * * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -303,7 +276,7 @@ function toNumber(value) { return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { @@ -348,7 +321,7 @@ function toString(value) { * @memberOf _ * @since 3.0.0 * @category String - * @param {string} [string=''] The string to search. + * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. * @param {number} [position=string.length] The position to search up to. * @returns {boolean} Returns `true` if `string` ends with `target`, diff --git a/lodash.endswith/package.json b/lodash.endswith/package.json index a9612be63..6eb3425ec 100644 --- a/lodash.endswith/package.json +++ b/lodash.endswith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.endswith", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.endsWith` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.every/README.md b/lodash.every/README.md index f4cab1252..b7310b6a1 100644 --- a/lodash.every/README.md +++ b/lodash.every/README.md @@ -1,4 +1,4 @@ -# lodash.every v4.2.0 +# lodash.every v4.2.1 The [lodash](https://lodash.com/) method `_.every` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var every = require('lodash.every'); ``` -See the [documentation](https://lodash.com/docs#every) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.every) for more details. +See the [documentation](https://lodash.com/docs#every) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.every) for more details. diff --git a/lodash.every/index.js b/lodash.every/index.js index 0d2d0fce3..6dc6f58ca 100644 --- a/lodash.every/index.js +++ b/lodash.every/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -253,8 +253,7 @@ var isArray = Array.isArray; * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -275,8 +274,8 @@ function isArrayLike(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.every/package.json b/lodash.every/package.json index c825ead9c..c8bf2a82f 100644 --- a/lodash.every/package.json +++ b/lodash.every/package.json @@ -1,6 +1,6 @@ { "name": "lodash.every", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.every` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.filter/README.md b/lodash.filter/README.md index 454beb56f..e3f93ce74 100644 --- a/lodash.filter/README.md +++ b/lodash.filter/README.md @@ -1,4 +1,4 @@ -# lodash.filter v4.2.0 +# lodash.filter v4.2.1 The [lodash](https://lodash.com/) method `_.filter` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var filter = require('lodash.filter'); ``` -See the [documentation](https://lodash.com/docs#filter) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.filter) for more details. +See the [documentation](https://lodash.com/docs#filter) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.filter) for more details. diff --git a/lodash.filter/index.js b/lodash.filter/index.js index 8d8347094..267828b9d 100644 --- a/lodash.filter/index.js +++ b/lodash.filter/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -21,13 +21,13 @@ var baseFilter = require('lodash._basefilter'), function arrayFilter(array, predicate) { var index = -1, length = array.length, - resIndex = -1, + resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { - result[++resIndex] = value; + result[resIndex++] = value; } } return result; diff --git a/lodash.filter/package.json b/lodash.filter/package.json index 201df9ca4..8b2330172 100644 --- a/lodash.filter/package.json +++ b/lodash.filter/package.json @@ -1,6 +1,6 @@ { "name": "lodash.filter", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.filter` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.find/README.md b/lodash.find/README.md index 87f3b0da9..9b699875c 100644 --- a/lodash.find/README.md +++ b/lodash.find/README.md @@ -1,4 +1,4 @@ -# lodash.find v4.2.0 +# lodash.find v4.2.1 The [lodash](https://lodash.com/) method `_.find` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var find = require('lodash.find'); ``` -See the [documentation](https://lodash.com/docs#find) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.find) for more details. +See the [documentation](https://lodash.com/docs#find) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.find) for more details. diff --git a/lodash.find/index.js b/lodash.find/index.js index c81970172..d3eae0370 100644 --- a/lodash.find/index.js +++ b/lodash.find/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.find/package.json b/lodash.find/package.json index 1fb3e4b0d..e97528ce4 100644 --- a/lodash.find/package.json +++ b/lodash.find/package.json @@ -1,6 +1,6 @@ { "name": "lodash.find", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.find` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,15 +9,15 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseeach": "^4.0.0", - "lodash._basefind": "^3.0.0", - "lodash._basefindindex": "^3.0.0", - "lodash._baseiteratee": "^4.0.0" + "lodash._baseeach": "~4.1.0", + "lodash._basefind": "~3.0.0", + "lodash._basefindindex": "~3.6.0", + "lodash._baseiteratee": "~4.5.0" } } diff --git a/lodash.findindex/README.md b/lodash.findindex/README.md index e36375e0a..395c1bb8a 100644 --- a/lodash.findindex/README.md +++ b/lodash.findindex/README.md @@ -1,4 +1,4 @@ -# lodash.findindex v4.2.0 +# lodash.findindex v4.2.1 The [lodash](https://lodash.com/) method `_.findIndex` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var findIndex = require('lodash.findindex'); ``` -See the [documentation](https://lodash.com/docs#findIndex) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.findindex) for more details. +See the [documentation](https://lodash.com/docs#findIndex) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.findindex) for more details. diff --git a/lodash.findindex/index.js b/lodash.findindex/index.js index 22a693f50..b7d90aa26 100644 --- a/lodash.findindex/index.js +++ b/lodash.findindex/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.findindex/package.json b/lodash.findindex/package.json index 3b57f2ff8..2becdef5c 100644 --- a/lodash.findindex/package.json +++ b/lodash.findindex/package.json @@ -1,6 +1,6 @@ { "name": "lodash.findindex", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.findIndex` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._basefindindex": "^3.0.0", - "lodash._baseiteratee": "^4.0.0" + "lodash._basefindindex": "~3.6.0", + "lodash._baseiteratee": "~4.5.0" } } diff --git a/lodash.findkey/README.md b/lodash.findkey/README.md index 13a5933c3..b6bcbb291 100644 --- a/lodash.findkey/README.md +++ b/lodash.findkey/README.md @@ -1,4 +1,4 @@ -# lodash.findkey v4.2.0 +# lodash.findkey v4.2.1 The [lodash](https://lodash.com/) method `_.findKey` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var findKey = require('lodash.findkey'); ``` -See the [documentation](https://lodash.com/docs#findKey) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.findkey) for more details. +See the [documentation](https://lodash.com/docs#findKey) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.findkey) for more details. diff --git a/lodash.findkey/index.js b/lodash.findkey/index.js index 2d00d49c5..0591a52e5 100644 --- a/lodash.findkey/index.js +++ b/lodash.findkey/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.findkey/package.json b/lodash.findkey/package.json index ecef9c9a1..2709fb5b4 100644 --- a/lodash.findkey/package.json +++ b/lodash.findkey/package.json @@ -1,6 +1,6 @@ { "name": "lodash.findkey", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.findKey` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,15 +9,15 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._basefind": "^3.0.0", - "lodash._basefor": "^3.0.0", - "lodash._baseiteratee": "^4.0.0", + "lodash._basefind": "~3.0.0", + "lodash._basefor": "~3.0.0", + "lodash._baseiteratee": "~4.5.0", "lodash.keys": "^4.0.0" } } diff --git a/lodash.findlast/README.md b/lodash.findlast/README.md index 5c3094e5b..e9bc746b9 100644 --- a/lodash.findlast/README.md +++ b/lodash.findlast/README.md @@ -1,4 +1,4 @@ -# lodash.findlast v4.2.0 +# lodash.findlast v4.2.1 The [lodash](https://lodash.com/) method `_.findLast` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var findLast = require('lodash.findlast'); ``` -See the [documentation](https://lodash.com/docs#findLast) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.findlast) for more details. +See the [documentation](https://lodash.com/docs#findLast) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.findlast) for more details. diff --git a/lodash.findlast/index.js b/lodash.findlast/index.js index 89d4e29d7..ea490f57d 100644 --- a/lodash.findlast/index.js +++ b/lodash.findlast/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.findlast/package.json b/lodash.findlast/package.json index b6e7aec91..9f7a070f0 100644 --- a/lodash.findlast/package.json +++ b/lodash.findlast/package.json @@ -1,6 +1,6 @@ { "name": "lodash.findlast", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.findLast` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,15 +9,15 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseeachright": "^4.0.0", - "lodash._basefind": "^3.0.0", - "lodash._basefindindex": "^3.0.0", - "lodash._baseiteratee": "^4.0.0" + "lodash._baseeachright": "~4.1.0", + "lodash._basefind": "~3.0.0", + "lodash._basefindindex": "~3.6.0", + "lodash._baseiteratee": "~4.5.0" } } diff --git a/lodash.findlastindex/README.md b/lodash.findlastindex/README.md index 7baea6e41..4aed82dbb 100644 --- a/lodash.findlastindex/README.md +++ b/lodash.findlastindex/README.md @@ -1,4 +1,4 @@ -# lodash.findlastindex v4.2.0 +# lodash.findlastindex v4.2.1 The [lodash](https://lodash.com/) method `_.findLastIndex` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var findLastIndex = require('lodash.findlastindex'); ``` -See the [documentation](https://lodash.com/docs#findLastIndex) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.findlastindex) for more details. +See the [documentation](https://lodash.com/docs#findLastIndex) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.findlastindex) for more details. diff --git a/lodash.findlastindex/index.js b/lodash.findlastindex/index.js index e23c42b81..b175c0293 100644 --- a/lodash.findlastindex/index.js +++ b/lodash.findlastindex/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.findlastindex/package.json b/lodash.findlastindex/package.json index 68bc5b5ce..b2601c6d7 100644 --- a/lodash.findlastindex/package.json +++ b/lodash.findlastindex/package.json @@ -1,6 +1,6 @@ { "name": "lodash.findlastindex", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.findLastIndex` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._basefindindex": "^3.0.0", - "lodash._baseiteratee": "^4.0.0" + "lodash._basefindindex": "~3.6.0", + "lodash._baseiteratee": "~4.5.0" } } diff --git a/lodash.flatmap/README.md b/lodash.flatmap/README.md index 07b8614f3..eb7e97630 100644 --- a/lodash.flatmap/README.md +++ b/lodash.flatmap/README.md @@ -1,4 +1,4 @@ -# lodash.flatmap v4.2.0 +# lodash.flatmap v4.2.1 The [lodash](https://lodash.com/) method `_.flatMap` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var flatMap = require('lodash.flatmap'); ``` -See the [documentation](https://lodash.com/docs#flatMap) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.flatmap) for more details. +See the [documentation](https://lodash.com/docs#flatMap) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.flatmap) for more details. diff --git a/lodash.flatmap/index.js b/lodash.flatmap/index.js index 3c0a46204..9744c94df 100644 --- a/lodash.flatmap/index.js +++ b/lodash.flatmap/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -10,15 +10,17 @@ var baseFlatten = require('lodash._baseflatten'), map = require('lodash.map'); /** - * Creates an array of flattened values by running each element in `collection` - * through `iteratee` and concating its result to the other mapped values. - * The iteratee is invoked with three arguments: (value, index|key, collection). + * 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). * * @static * @memberOf _ + * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration. + * @param {Array|Function|Object|string} [iteratee=_.identity] + * The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * diff --git a/lodash.flatmap/package.json b/lodash.flatmap/package.json index ccb0c125a..d7e3715be 100644 --- a/lodash.flatmap/package.json +++ b/lodash.flatmap/package.json @@ -1,6 +1,6 @@ { "name": "lodash.flatmap", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.flatMap` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseflatten": "^4.0.0", + "lodash._baseflatten": "~4.1.0", "lodash.map": "^4.0.0" } } diff --git a/lodash.flip/README.md b/lodash.flip/README.md index b51b0ffc9..92dd90b18 100644 --- a/lodash.flip/README.md +++ b/lodash.flip/README.md @@ -1,4 +1,4 @@ -# lodash.flip v4.2.0 +# lodash.flip v4.2.1 The [lodash](https://lodash.com/) method `_.flip` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var flip = require('lodash.flip'); ``` -See the [documentation](https://lodash.com/docs#flip) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.flip) for more details. +See the [documentation](https://lodash.com/docs#flip) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.flip) for more details. diff --git a/lodash.flip/index.js b/lodash.flip/index.js index a83aaa71f..9a323cbcf 100644 --- a/lodash.flip/index.js +++ b/lodash.flip/index.js @@ -51,7 +51,7 @@ var funcTag = '[object Function]', /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; @@ -136,7 +136,7 @@ function arrayEach(array, iteratee) { * specifying an index to search from. * * @private - * @param {Array} [array] The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ @@ -150,7 +150,7 @@ function arrayIncludes(array, value) { * support for iteratee shorthands. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. @@ -172,7 +172,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) { * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -280,7 +280,8 @@ function replaceHolders(array, placeholder) { } /** Used for built-in method references. */ -var objectProto = Object.prototype; +var funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; @@ -292,14 +293,14 @@ var maskSrcKey = (function() { }()); /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -476,7 +477,7 @@ function createBind(func, bitmask, thisArg) { function createCtor(Ctor) { 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 + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -954,15 +955,14 @@ function flip(func) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -1079,7 +1079,7 @@ function toFinite(value) { * Converts `value` to an integer. * * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -1139,7 +1139,7 @@ function toNumber(value) { return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { diff --git a/lodash.flip/package.json b/lodash.flip/package.json index 8632825c1..96c47620f 100644 --- a/lodash.flip/package.json +++ b/lodash.flip/package.json @@ -1,6 +1,6 @@ { "name": "lodash.flip", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.flip` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.foreach/README.md b/lodash.foreach/README.md index dcda49d8e..d4529620c 100644 --- a/lodash.foreach/README.md +++ b/lodash.foreach/README.md @@ -1,4 +1,4 @@ -# lodash.foreach v4.2.0 +# lodash.foreach v4.2.1 The [lodash](https://lodash.com/) method `_.forEach` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var forEach = require('lodash.foreach'); ``` -See the [documentation](https://lodash.com/docs#forEach) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.foreach) for more details. +See the [documentation](https://lodash.com/docs#forEach) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.foreach) for more details. diff --git a/lodash.foreach/index.js b/lodash.foreach/index.js index a2e84738e..c72757183 100644 --- a/lodash.foreach/index.js +++ b/lodash.foreach/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -47,6 +47,7 @@ function arrayEach(array, iteratee) { * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight * @example * * _([1, 2]).forEach(function(value) { @@ -60,9 +61,8 @@ function arrayEach(array, iteratee) { * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEach(collection, iteratee) - : baseEach(collection, baseIteratee(iteratee)); + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, baseIteratee(iteratee, 3)); } /** diff --git a/lodash.foreach/package.json b/lodash.foreach/package.json index 316b4df6e..1414b971b 100644 --- a/lodash.foreach/package.json +++ b/lodash.foreach/package.json @@ -1,6 +1,6 @@ { "name": "lodash.foreach", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.forEach` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.forinright/README.md b/lodash.forinright/README.md index f3910e6c3..1e15bf2b9 100644 --- a/lodash.forinright/README.md +++ b/lodash.forinright/README.md @@ -1,4 +1,4 @@ -# lodash.forinright v4.2.0 +# lodash.forinright v4.2.1 The [lodash](https://lodash.com/) method `_.forInRight` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var forInRight = require('lodash.forinright'); ``` -See the [documentation](https://lodash.com/docs#forInRight) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.forinright) for more details. +See the [documentation](https://lodash.com/docs#forInRight) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.forinright) for more details. diff --git a/lodash.forinright/index.js b/lodash.forinright/index.js index f95475a8e..c21f4ab80 100644 --- a/lodash.forinright/index.js +++ b/lodash.forinright/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -21,6 +21,7 @@ var baseForRight = require('lodash._baseforright'), * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. + * @see _.forIn * @example * * function Foo() { @@ -38,7 +39,7 @@ var baseForRight = require('lodash._baseforright'), function forInRight(object, iteratee) { return object == null ? object - : baseForRight(object, baseIteratee(iteratee), keysIn); + : baseForRight(object, baseIteratee(iteratee, 3), keysIn); } module.exports = forInRight; diff --git a/lodash.forinright/package.json b/lodash.forinright/package.json index 89592a0cb..a4b92a349 100644 --- a/lodash.forinright/package.json +++ b/lodash.forinright/package.json @@ -1,6 +1,6 @@ { "name": "lodash.forinright", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.forInRight` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.forownright/README.md b/lodash.forownright/README.md index 2f7f3db95..735f8c220 100644 --- a/lodash.forownright/README.md +++ b/lodash.forownright/README.md @@ -1,4 +1,4 @@ -# lodash.forownright v4.2.0 +# lodash.forownright v4.2.1 The [lodash](https://lodash.com/) method `_.forOwnRight` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var forOwnRight = require('lodash.forownright'); ``` -See the [documentation](https://lodash.com/docs#forOwnRight) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.forownright) for more details. +See the [documentation](https://lodash.com/docs#forOwnRight) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.forownright) for more details. diff --git a/lodash.forownright/index.js b/lodash.forownright/index.js index 18183154e..4d30adf03 100644 --- a/lodash.forownright/index.js +++ b/lodash.forownright/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -33,6 +33,7 @@ function baseForOwnRight(object, iteratee) { * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. + * @see _.forOwn * @example * * function Foo() { @@ -48,7 +49,7 @@ function baseForOwnRight(object, iteratee) { * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. */ function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, baseIteratee(iteratee)); + return object && baseForOwnRight(object, baseIteratee(iteratee, 3)); } module.exports = forOwnRight; diff --git a/lodash.forownright/package.json b/lodash.forownright/package.json index a55bb7101..593839322 100644 --- a/lodash.forownright/package.json +++ b/lodash.forownright/package.json @@ -1,6 +1,6 @@ { "name": "lodash.forownright", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.forOwnRight` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.get/README.md b/lodash.get/README.md index 57c2c6194..450cad36c 100644 --- a/lodash.get/README.md +++ b/lodash.get/README.md @@ -1,4 +1,4 @@ -# lodash.get v4.2.0 +# lodash.get v4.2.1 The [lodash](https://lodash.com/) method `_.get` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var get = require('lodash.get'); ``` -See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.get) for more details. +See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.get) for more details. diff --git a/lodash.get/index.js b/lodash.get/index.js index 6dfbbb445..e1664abf7 100644 --- a/lodash.get/index.js +++ b/lodash.get/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -25,17 +25,6 @@ var objectProto = Object.prototype; */ var objectToString = objectProto.toString; -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast property path array. - */ -function baseCastPath(value) { - return isArray(value) ? value : stringToPath(value); -} - /** * The base implementation of `_.get` without support for default values. * @@ -45,7 +34,7 @@ function baseCastPath(value) { * @returns {*} Returns the resolved value. */ function baseGet(object, path) { - path = isKey(path, object) ? [path] : baseCastPath(path); + path = isKey(path, object) ? [path] : castPath(path); var index = 0, length = path.length; @@ -56,6 +45,17 @@ function baseGet(object, path) { return (index && index == length) ? object : undefined; } +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + /** * Checks if `value` is a property name and not a property path. * diff --git a/lodash.get/package.json b/lodash.get/package.json index 89f855f9e..49c865af3 100644 --- a/lodash.get/package.json +++ b/lodash.get/package.json @@ -1,6 +1,6 @@ { "name": "lodash.get", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.get` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.groupby/README.md b/lodash.groupby/README.md index b9038ff75..dc5728c38 100644 --- a/lodash.groupby/README.md +++ b/lodash.groupby/README.md @@ -1,4 +1,4 @@ -# lodash.groupby v4.2.0 +# lodash.groupby v4.2.1 The [lodash](https://lodash.com/) method `_.groupBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var groupBy = require('lodash.groupby'); ``` -See the [documentation](https://lodash.com/docs#groupBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.groupby) for more details. +See the [documentation](https://lodash.com/docs#groupBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.groupby) for more details. diff --git a/lodash.groupby/index.js b/lodash.groupby/index.js index c9ef2e31b..4a092cdea 100644 --- a/lodash.groupby/index.js +++ b/lodash.groupby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.groupby/package.json b/lodash.groupby/package.json index 25dae8cf1..578343715 100644 --- a/lodash.groupby/package.json +++ b/lodash.groupby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.groupby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.groupBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseeach": "^4.0.0", - "lodash._baseiteratee": "^4.0.0" + "lodash._baseeach": "~4.1.0", + "lodash._baseiteratee": "~4.5.0" } } diff --git a/lodash.has/README.md b/lodash.has/README.md index 442c5b7f8..00af92dcb 100644 --- a/lodash.has/README.md +++ b/lodash.has/README.md @@ -1,4 +1,4 @@ -# lodash.has v4.2.0 +# lodash.has v4.2.1 The [lodash](https://lodash.com/) method `_.has` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var has = require('lodash.has'); ``` -See the [documentation](https://lodash.com/docs#has) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.has) for more details. +See the [documentation](https://lodash.com/docs#has) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.has) for more details. diff --git a/lodash.has/index.js b/lodash.has/index.js index 6c1a2d4e3..cc71b1124 100644 --- a/lodash.has/index.js +++ b/lodash.has/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -294,8 +294,7 @@ var isArray = Array.isArray; * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -343,8 +342,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.has/package.json b/lodash.has/package.json index 4564a2730..c843bb9b2 100644 --- a/lodash.has/package.json +++ b/lodash.has/package.json @@ -1,6 +1,6 @@ { "name": "lodash.has", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.has` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.hasin/README.md b/lodash.hasin/README.md index 33842bdec..6bbcc0e62 100644 --- a/lodash.hasin/README.md +++ b/lodash.hasin/README.md @@ -1,4 +1,4 @@ -# lodash.hasin v4.2.0 +# lodash.hasin v4.2.1 The [lodash](https://lodash.com/) method `_.hasIn` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var hasIn = require('lodash.hasin'); ``` -See the [documentation](https://lodash.com/docs#hasIn) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.hasin) for more details. +See the [documentation](https://lodash.com/docs#hasIn) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.hasin) for more details. diff --git a/lodash.hasin/index.js b/lodash.hasin/index.js index a26242ad4..cb36c41dd 100644 --- a/lodash.hasin/index.js +++ b/lodash.hasin/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -289,8 +289,7 @@ var isArray = Array.isArray; * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -338,8 +337,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.hasin/package.json b/lodash.hasin/package.json index 2fb920722..666a3619b 100644 --- a/lodash.hasin/package.json +++ b/lodash.hasin/package.json @@ -1,6 +1,6 @@ { "name": "lodash.hasin", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.hasIn` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.intersectionby/README.md b/lodash.intersectionby/README.md index 739901de4..b196e0946 100644 --- a/lodash.intersectionby/README.md +++ b/lodash.intersectionby/README.md @@ -1,4 +1,4 @@ -# lodash.intersectionby v4.2.0 +# lodash.intersectionby v4.2.1 The [lodash](https://lodash.com/) method `_.intersectionBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var intersectionBy = require('lodash.intersectionby'); ``` -See the [documentation](https://lodash.com/docs#intersectionBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.intersectionby) for more details. +See the [documentation](https://lodash.com/docs#intersectionBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.intersectionby) for more details. diff --git a/lodash.intersectionby/index.js b/lodash.intersectionby/index.js index 59c575ef2..b2d2fd87a 100644 --- a/lodash.intersectionby/index.js +++ b/lodash.intersectionby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -85,14 +85,15 @@ var getLength = baseProperty('length'); /** * This method is like `_.intersection` except that it accepts `iteratee` * which is invoked for each element of each `arrays` to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * by which they're compared. Result values are chosen from the first array. + * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of shared values. + * @returns {Array} Returns the new array of intersecting values. * @example * * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); @@ -159,8 +160,7 @@ function last(array) { * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -208,8 +208,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.intersectionby/package.json b/lodash.intersectionby/package.json index 9cb531f1d..dc38329a9 100644 --- a/lodash.intersectionby/package.json +++ b/lodash.intersectionby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.intersectionby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.intersectionBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.invertby/LICENSE b/lodash.invertby/LICENSE index b054ca5a3..bcbe13d67 100644 --- a/lodash.invertby/LICENSE +++ b/lodash.invertby/LICENSE @@ -1,22 +1,23 @@ +The MIT License (MIT) + Copyright 2012-2016 The Dojo Foundation Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lodash.invertby/README.md b/lodash.invertby/README.md index edebc1554..672ddcdbd 100644 --- a/lodash.invertby/README.md +++ b/lodash.invertby/README.md @@ -1,4 +1,4 @@ -# lodash.invertby v4.2.0 +# lodash.invertby v4.2.1 The [lodash](https://lodash.com/) method `_.invertBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var invertBy = require('lodash.invertby'); ``` -See the [documentation](https://lodash.com/docs#invertBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.invertby) for more details. +See the [documentation](https://lodash.com/docs#invertBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.invertby) for more details. diff --git a/lodash.invertby/index.js b/lodash.invertby/index.js index f2cc9a5bb..86303d825 100644 --- a/lodash.invertby/index.js +++ b/lodash.invertby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -12,19 +12,13 @@ var baseFor = require('lodash._basefor'), get = require('lodash.get'), hasIn = require('lodash.hasin'), keys = require('lodash.keys'), - root = require('lodash._root'), - toPairs = require('lodash.topairs'); + toPairs = require('lodash.topairs'), + toString = require('lodash.tostring'); /** Used to compose bitmasks for comparison styles. */ var UNORDERED_COMPARE_FLAG = 1, PARTIAL_COMPARE_FLAG = 2; -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, @@ -39,19 +33,6 @@ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var Symbol = root.Symbol; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = Symbol ? symbolProto.toString : undefined; - /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * @@ -334,89 +315,6 @@ function isObject(value) { return !!value && (type == 'object' || type == 'function'); } -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return Symbol ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - /** * This method is like `_.invert` except that the inverted object is generated * from the results of running each element of `object` through `iteratee`. @@ -451,7 +349,7 @@ var invertBy = createInverter(function(result, value, key) { }, baseIteratee); /** - * This method returns the first argument provided to it. + * This method returns the first argument given to it. * * @static * @memberOf _ diff --git a/lodash.invertby/package.json b/lodash.invertby/package.json index 170dda8c3..dfc7515dd 100644 --- a/lodash.invertby/package.json +++ b/lodash.invertby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.invertby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.invertBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -18,10 +18,10 @@ "lodash._basefor": "^3.0.0", "lodash._baseisequal": "^4.0.0", "lodash._baseismatch": "^4.0.0", - "lodash._root": "^3.0.0", "lodash.get": "^4.0.0", "lodash.hasin": "^4.0.0", "lodash.keys": "^4.0.0", - "lodash.topairs": "^4.0.0" + "lodash.topairs": "^4.0.0", + "lodash.tostring": "^4.0.0" } } diff --git a/lodash.invoke/README.md b/lodash.invoke/README.md index cee18cff3..90c40cfb0 100644 --- a/lodash.invoke/README.md +++ b/lodash.invoke/README.md @@ -1,4 +1,4 @@ -# lodash.invoke v4.2.0 +# lodash.invoke v4.2.1 The [lodash](https://lodash.com/) method `_.invoke` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var invoke = require('lodash.invoke'); ``` -See the [documentation](https://lodash.com/docs#invoke) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.invoke) for more details. +See the [documentation](https://lodash.com/docs#invoke) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.invoke) for more details. diff --git a/lodash.invoke/index.js b/lodash.invoke/index.js index 58b31d606..b109d5c84 100644 --- a/lodash.invoke/index.js +++ b/lodash.invoke/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.invoke/package.json b/lodash.invoke/package.json index ecb680dbc..a9fb2fe81 100644 --- a/lodash.invoke/package.json +++ b/lodash.invoke/package.json @@ -1,6 +1,6 @@ { "name": "lodash.invoke", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.invoke` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseslice": "^4.0.0", + "lodash._baseslice": "~4.0.0", "lodash.rest": "^4.0.0", "lodash.tostring": "^4.0.0" } diff --git a/lodash.invokemap/README.md b/lodash.invokemap/README.md index 7fc057f8e..07ef84672 100644 --- a/lodash.invokemap/README.md +++ b/lodash.invokemap/README.md @@ -1,4 +1,4 @@ -# lodash.invokemap v4.2.0 +# lodash.invokemap v4.2.1 The [lodash](https://lodash.com/) method `_.invokeMap` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var invokeMap = require('lodash.invokemap'); ``` -See the [documentation](https://lodash.com/docs#invokeMap) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.invokemap) for more details. +See the [documentation](https://lodash.com/docs#invokeMap) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.invokemap) for more details. diff --git a/lodash.invokemap/index.js b/lodash.invokemap/index.js index 541857278..0e5f9ed07 100644 --- a/lodash.invokemap/index.js +++ b/lodash.invokemap/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -279,8 +279,7 @@ var isArray = Array.isArray; * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -301,8 +300,8 @@ function isArrayLike(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.invokemap/package.json b/lodash.invokemap/package.json index 4caafd14e..df9627642 100644 --- a/lodash.invokemap/package.json +++ b/lodash.invokemap/package.json @@ -1,6 +1,6 @@ { "name": "lodash.invokemap", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.invokeMap` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.isempty/README.md b/lodash.isempty/README.md index 79f92f4a8..651cf64e9 100644 --- a/lodash.isempty/README.md +++ b/lodash.isempty/README.md @@ -1,4 +1,4 @@ -# lodash.isempty v4.2.0 +# lodash.isempty v4.2.1 The [lodash](https://lodash.com/) method `_.isEmpty` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var isEmpty = require('lodash.isempty'); ``` -See the [documentation](https://lodash.com/docs#isEmpty) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.isempty) for more details. +See the [documentation](https://lodash.com/docs#isEmpty) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.isempty) for more details. diff --git a/lodash.isempty/index.js b/lodash.isempty/index.js index b62255f77..eef85e470 100644 --- a/lodash.isempty/index.js +++ b/lodash.isempty/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -25,7 +25,10 @@ var argsTag = '[object Arguments]', var dataViewTag = '[object DataView]'; -/** 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; /** Used to detect host constructors (Safari). */ @@ -81,7 +84,8 @@ var funcToString = Function.prototype.toString; var hasOwnProperty = objectProto.hasOwnProperty; /** - * 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. */ var objectToString = objectProto.toString; @@ -107,18 +111,18 @@ var DataView = getNative(root, 'DataView'), var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); /** 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); /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { @@ -172,8 +176,8 @@ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = objectToString.call(value), - Ctor = result == objectTag ? value.constructor : null, - ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : ''; + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; if (ctorString) { switch (ctorString) { @@ -188,6 +192,25 @@ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || }; } +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + /** * Checks if `value` is likely an `arguments` object. * @@ -430,8 +453,9 @@ function isLength(value) { } /** - * 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('')`) * * @static * @memberOf _ @@ -505,14 +529,11 @@ function isObjectLike(value) { * // => false */ 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)); } /** @@ -546,7 +567,7 @@ function isString(value) { * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new constant function. * @example * * var object = { 'user': 'fred' }; diff --git a/lodash.isempty/package.json b/lodash.isempty/package.json index 991644787..df0887bdb 100644 --- a/lodash.isempty/package.json +++ b/lodash.isempty/package.json @@ -1,6 +1,6 @@ { "name": "lodash.isempty", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.isEmpty` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.keyby/README.md b/lodash.keyby/README.md index 5ea6517c3..914295646 100644 --- a/lodash.keyby/README.md +++ b/lodash.keyby/README.md @@ -1,4 +1,4 @@ -# lodash.keyby v4.2.0 +# lodash.keyby v4.2.1 The [lodash](https://lodash.com/) method `_.keyBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var keyBy = require('lodash.keyby'); ``` -See the [documentation](https://lodash.com/docs#keyBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.keyby) for more details. +See the [documentation](https://lodash.com/docs#keyBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.keyby) for more details. diff --git a/lodash.keyby/index.js b/lodash.keyby/index.js index 109b672d4..3f62df87e 100644 --- a/lodash.keyby/index.js +++ b/lodash.keyby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.keyby/package.json b/lodash.keyby/package.json index c62e445c2..3245f1c74 100644 --- a/lodash.keyby/package.json +++ b/lodash.keyby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.keyby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.keyBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseeach": "^4.0.0", - "lodash._baseiteratee": "^4.0.0" + "lodash._baseeach": "~4.1.0", + "lodash._baseiteratee": "~4.5.0" } } diff --git a/lodash.map/README.md b/lodash.map/README.md index 6211639fd..673d47e89 100644 --- a/lodash.map/README.md +++ b/lodash.map/README.md @@ -1,4 +1,4 @@ -# lodash.map v4.2.0 +# lodash.map v4.2.1 The [lodash](https://lodash.com/) method `_.map` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var map = require('lodash.map'); ``` -See the [documentation](https://lodash.com/docs#map) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.map) for more details. +See the [documentation](https://lodash.com/docs#map) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.map) for more details. diff --git a/lodash.map/index.js b/lodash.map/index.js index 45dfb4256..14655f330 100644 --- a/lodash.map/index.js +++ b/lodash.map/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -184,8 +184,7 @@ var isArray = Array.isArray; * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -206,8 +205,8 @@ function isArrayLike(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.map/package.json b/lodash.map/package.json index acf7798bd..931f431e2 100644 --- a/lodash.map/package.json +++ b/lodash.map/package.json @@ -1,6 +1,6 @@ { "name": "lodash.map", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.map` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.mapkeys/README.md b/lodash.mapkeys/README.md index 62cffbd37..a233f12a3 100644 --- a/lodash.mapkeys/README.md +++ b/lodash.mapkeys/README.md @@ -1,4 +1,4 @@ -# lodash.mapkeys v4.2.0 +# lodash.mapkeys v4.2.1 The [lodash](https://lodash.com/) method `_.mapKeys` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var mapKeys = require('lodash.mapkeys'); ``` -See the [documentation](https://lodash.com/docs#mapKeys) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.mapkeys) for more details. +See the [documentation](https://lodash.com/docs#mapKeys) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.mapkeys) for more details. diff --git a/lodash.mapkeys/index.js b/lodash.mapkeys/index.js index 0917e70cf..9f969e7fa 100644 --- a/lodash.mapkeys/index.js +++ b/lodash.mapkeys/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.mapkeys/package.json b/lodash.mapkeys/package.json index 813fc21ef..e3c376633 100644 --- a/lodash.mapkeys/package.json +++ b/lodash.mapkeys/package.json @@ -1,6 +1,6 @@ { "name": "lodash.mapkeys", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.mapKeys` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,14 +9,14 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._basefor": "^3.0.0", - "lodash._baseiteratee": "^4.0.0", + "lodash._basefor": "~3.0.0", + "lodash._baseiteratee": "~4.5.0", "lodash.keys": "^4.0.0" } } diff --git a/lodash.mapvalues/README.md b/lodash.mapvalues/README.md index 2320c713d..29c3638db 100644 --- a/lodash.mapvalues/README.md +++ b/lodash.mapvalues/README.md @@ -1,4 +1,4 @@ -# lodash.mapvalues v4.2.0 +# lodash.mapvalues v4.2.1 The [lodash](https://lodash.com/) method `_.mapValues` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var mapValues = require('lodash.mapvalues'); ``` -See the [documentation](https://lodash.com/docs#mapValues) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.mapvalues) for more details. +See the [documentation](https://lodash.com/docs#mapValues) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.mapvalues) for more details. diff --git a/lodash.mapvalues/index.js b/lodash.mapvalues/index.js index 4cf6a18a5..c4e8052b1 100644 --- a/lodash.mapvalues/index.js +++ b/lodash.mapvalues/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.mapvalues/package.json b/lodash.mapvalues/package.json index 1623359b3..da5e2a2a8 100644 --- a/lodash.mapvalues/package.json +++ b/lodash.mapvalues/package.json @@ -1,6 +1,6 @@ { "name": "lodash.mapvalues", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.mapValues` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,14 +9,14 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._basefor": "^3.0.0", - "lodash._baseiteratee": "^4.0.0", + "lodash._basefor": "~3.0.0", + "lodash._baseiteratee": "~4.5.0", "lodash.keys": "^4.0.0" } } diff --git a/lodash.maxby/README.md b/lodash.maxby/README.md index 4650435a2..648f31220 100644 --- a/lodash.maxby/README.md +++ b/lodash.maxby/README.md @@ -1,4 +1,4 @@ -# lodash.maxby v4.2.0 +# lodash.maxby v4.2.1 The [lodash](https://lodash.com/) method `_.maxBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var maxBy = require('lodash.maxby'); ``` -See the [documentation](https://lodash.com/docs#maxBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.maxby) for more details. +See the [documentation](https://lodash.com/docs#maxBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.maxby) for more details. diff --git a/lodash.maxby/index.js b/lodash.maxby/index.js index 1a66552f2..b5970a058 100644 --- a/lodash.maxby/index.js +++ b/lodash.maxby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.maxby/package.json b/lodash.maxby/package.json index 579ac56ef..b9b329d16 100644 --- a/lodash.maxby/package.json +++ b/lodash.maxby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.maxby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.maxBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,12 +9,12 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0" + "lodash._baseiteratee": "~4.5.0" } } diff --git a/lodash.method/README.md b/lodash.method/README.md index f11a80b1c..91ef67418 100644 --- a/lodash.method/README.md +++ b/lodash.method/README.md @@ -1,4 +1,4 @@ -# lodash.method v4.2.0 +# lodash.method v4.2.1 The [lodash](https://lodash.com/) method `_.method` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var method = require('lodash.method'); ``` -See the [documentation](https://lodash.com/docs#method) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.method) for more details. +See the [documentation](https://lodash.com/docs#method) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.method) for more details. diff --git a/lodash.method/index.js b/lodash.method/index.js index ad6e561b1..cc3306ec3 100644 --- a/lodash.method/index.js +++ b/lodash.method/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.method/package.json b/lodash.method/package.json index 82cbb4bd3..50a911cf5 100644 --- a/lodash.method/package.json +++ b/lodash.method/package.json @@ -1,6 +1,6 @@ { "name": "lodash.method", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.method` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseslice": "^4.0.0", + "lodash._baseslice": "~4.0.0", "lodash.rest": "^4.0.0", "lodash.tostring": "^4.0.0" } diff --git a/lodash.methodof/README.md b/lodash.methodof/README.md index d714244b2..2eb0749a2 100644 --- a/lodash.methodof/README.md +++ b/lodash.methodof/README.md @@ -1,4 +1,4 @@ -# lodash.methodof v4.2.0 +# lodash.methodof v4.2.1 The [lodash](https://lodash.com/) method `_.methodOf` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var methodOf = require('lodash.methodof'); ``` -See the [documentation](https://lodash.com/docs#methodOf) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.methodof) for more details. +See the [documentation](https://lodash.com/docs#methodOf) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.methodof) for more details. diff --git a/lodash.methodof/index.js b/lodash.methodof/index.js index 479a70bd5..e8004f5da 100644 --- a/lodash.methodof/index.js +++ b/lodash.methodof/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.methodof/package.json b/lodash.methodof/package.json index 5a6e023db..11e2e77a6 100644 --- a/lodash.methodof/package.json +++ b/lodash.methodof/package.json @@ -1,6 +1,6 @@ { "name": "lodash.methodof", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.methodOf` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseslice": "^4.0.0", + "lodash._baseslice": "~4.0.0", "lodash.rest": "^4.0.0", "lodash.tostring": "^4.0.0" } diff --git a/lodash.minby/README.md b/lodash.minby/README.md index 5b93a915e..4efc6ac1c 100644 --- a/lodash.minby/README.md +++ b/lodash.minby/README.md @@ -1,4 +1,4 @@ -# lodash.minby v4.2.0 +# lodash.minby v4.2.1 The [lodash](https://lodash.com/) method `_.minBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var minBy = require('lodash.minby'); ``` -See the [documentation](https://lodash.com/docs#minBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.minby) for more details. +See the [documentation](https://lodash.com/docs#minBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.minby) for more details. diff --git a/lodash.minby/index.js b/lodash.minby/index.js index d3dc507ed..8420e1933 100644 --- a/lodash.minby/index.js +++ b/lodash.minby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.minby/package.json b/lodash.minby/package.json index d9f67e6bb..df379b15b 100644 --- a/lodash.minby/package.json +++ b/lodash.minby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.minby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.minBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,12 +9,12 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0" + "lodash._baseiteratee": "~4.5.0" } } diff --git a/lodash.ntharg/README.md b/lodash.ntharg/README.md index 79323ebed..13d38a26f 100644 --- a/lodash.ntharg/README.md +++ b/lodash.ntharg/README.md @@ -1,4 +1,4 @@ -# lodash.ntharg v4.2.0 +# lodash.ntharg v4.2.1 The [lodash](https://lodash.com/) method `_.nthArg` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var nthArg = require('lodash.ntharg'); ``` -See the [documentation](https://lodash.com/docs#nthArg) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.ntharg) for more details. +See the [documentation](https://lodash.com/docs#nthArg) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.ntharg) for more details. diff --git a/lodash.ntharg/index.js b/lodash.ntharg/index.js index 6b3584e57..1856f204d 100644 --- a/lodash.ntharg/index.js +++ b/lodash.ntharg/index.js @@ -14,9 +14,7 @@ var INFINITY = 1 / 0, NAN = 0 / 0; /** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - symbolTag = '[object Symbol]'; +var symbolTag = '[object Symbol]'; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; @@ -61,7 +59,7 @@ var objectProto = Object.prototype; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -130,34 +128,9 @@ function isIndex(value, length) { (value > -1 && value % 1 == 0 && value < length); } -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -274,7 +247,7 @@ function toFinite(value) { * Converts `value` to an integer. * * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -334,7 +307,7 @@ function toNumber(value) { return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { diff --git a/lodash.ntharg/package.json b/lodash.ntharg/package.json index ef04400e3..4b6803b39 100644 --- a/lodash.ntharg/package.json +++ b/lodash.ntharg/package.json @@ -1,6 +1,6 @@ { "name": "lodash.ntharg", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.nthArg` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.omit/README.md b/lodash.omit/README.md index b3d7bab8e..c93d27be3 100644 --- a/lodash.omit/README.md +++ b/lodash.omit/README.md @@ -1,4 +1,4 @@ -# lodash.omit v4.2.0 +# lodash.omit v4.2.1 The [lodash](https://lodash.com/) method `_.omit` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var omit = require('lodash.omit'); ``` -See the [documentation](https://lodash.com/docs#omit) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.omit) for more details. +See the [documentation](https://lodash.com/docs#omit) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.omit) for more details. diff --git a/lodash.omit/index.js b/lodash.omit/index.js index 82d7dfdc3..500677ace 100644 --- a/lodash.omit/index.js +++ b/lodash.omit/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -94,17 +94,6 @@ var getOwnPropertySymbols = Object.getOwnPropertySymbols; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetPrototype = Object.getPrototypeOf; -/** - * Casts `value` to a string if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the cast key. - */ -function baseCastKey(key) { - return (typeof key == 'string' || isSymbol(key)) ? key : (key + ''); -} - /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and @@ -202,6 +191,17 @@ var getSymbolsIn = !getOwnPropertySymbols ? getSymbols : function(object) { return result; }; +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(key) { + return (typeof key == 'string' || isSymbol(key)) ? key : (key + ''); +} + /** * Checks if `value` is classified as an `Array` object. * @@ -290,8 +290,7 @@ function isSymbol(value) { * @memberOf _ * @category Object * @param {Object} object The source object. - * @param {...(string|string[])} [props] The property identifiers to omit, - * specified individually or in arrays. + * @param {...(string|string[])} [props] The property identifiers to omit. * @returns {Object} Returns the new object. * @example * @@ -304,7 +303,7 @@ var omit = rest(function(object, props) { if (object == null) { return {}; } - props = arrayMap(baseFlatten(props, 1), baseCastKey); + props = arrayMap(baseFlatten(props, 1), toKey); return basePick(object, baseDifference(getAllKeysIn(object), props)); }); diff --git a/lodash.omit/package.json b/lodash.omit/package.json index 1e4026b40..73b02bddd 100644 --- a/lodash.omit/package.json +++ b/lodash.omit/package.json @@ -1,6 +1,6 @@ { "name": "lodash.omit", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.omit` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.omitby/README.md b/lodash.omitby/README.md index 6f9f4de74..5e04dbafa 100644 --- a/lodash.omitby/README.md +++ b/lodash.omitby/README.md @@ -1,4 +1,4 @@ -# lodash.omitby v4.2.0 +# lodash.omitby v4.2.1 The [lodash](https://lodash.com/) method `_.omitBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var omitBy = require('lodash.omitby'); ``` -See the [documentation](https://lodash.com/docs#omitBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.omitby) for more details. +See the [documentation](https://lodash.com/docs#omitBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.omitby) for more details. diff --git a/lodash.omitby/index.js b/lodash.omitby/index.js index 7fdd16fc0..ec54f3db7 100644 --- a/lodash.omitby/index.js +++ b/lodash.omitby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -41,9 +41,10 @@ function basePickBy(object, predicate) { } /** - * The opposite of `_.pickBy`; this method creates an object composed of the - * own and inherited enumerable properties of `object` that `predicate` - * doesn't return truthy for. + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable properties of `object` that `predicate` + * doesn't return truthy for. The predicate is invoked with two arguments: + * (value, key). * * @static * @memberOf _ @@ -59,7 +60,7 @@ function basePickBy(object, predicate) { * // => { 'b': '2' } */ function omitBy(object, predicate) { - predicate = baseIteratee(predicate, 2); + predicate = baseIteratee(predicate); return basePickBy(object, function(value, key) { return !predicate(value, key); }); diff --git a/lodash.omitby/package.json b/lodash.omitby/package.json index ffe29b8d0..c113022cf 100644 --- a/lodash.omitby/package.json +++ b/lodash.omitby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.omitby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.omitBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.orderby/README.md b/lodash.orderby/README.md index bc43bb894..58a67d924 100644 --- a/lodash.orderby/README.md +++ b/lodash.orderby/README.md @@ -1,4 +1,4 @@ -# lodash.orderby v4.2.0 +# lodash.orderby v4.2.1 The [lodash](https://lodash.com/) method `_.orderBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var orderBy = require('lodash.orderby'); ``` -See the [documentation](https://lodash.com/docs#orderBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.orderby) for more details. +See the [documentation](https://lodash.com/docs#orderBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.orderby) for more details. diff --git a/lodash.orderby/index.js b/lodash.orderby/index.js index aff4336f8..1a1db83e0 100644 --- a/lodash.orderby/index.js +++ b/lodash.orderby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -37,9 +37,9 @@ function arrayMap(array, iteratee) { } /** - * The base implementation of `_.sortBy` which uses `comparer` to define - * the sort order of `array` and replaces criteria objects with their - * corresponding values. + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. * * @private * @param {Array} array The array to sort. @@ -166,12 +166,8 @@ function baseMap(collection, iteratee) { * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { - var index = -1, - toIteratee = baseIteratee; - - iteratees = arrayMap(iteratees.length ? iteratees : Array(1), function(iteratee) { - return toIteratee(iteratee); - }); + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : Array(1), baseIteratee); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { @@ -301,8 +297,7 @@ var isArray = Array.isArray; * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -323,8 +318,8 @@ function isArrayLike(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.orderby/package.json b/lodash.orderby/package.json index 2e0874544..a4cd09843 100644 --- a/lodash.orderby/package.json +++ b/lodash.orderby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.orderby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.orderBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.over/README.md b/lodash.over/README.md index 6a740f5c5..5ba790e04 100644 --- a/lodash.over/README.md +++ b/lodash.over/README.md @@ -1,4 +1,4 @@ -# lodash.over v4.2.0 +# lodash.over v4.2.1 The [lodash](https://lodash.com/) method `_.over` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var over = require('lodash.over'); ``` -See the [documentation](https://lodash.com/docs#over) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.over) for more details. +See the [documentation](https://lodash.com/docs#over) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.over) for more details. diff --git a/lodash.over/index.js b/lodash.over/index.js index f316e34df..d262fbbde 100644 --- a/lodash.over/index.js +++ b/lodash.over/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.over/package.json b/lodash.over/package.json index f3c24e922..c5ebee2f8 100644 --- a/lodash.over/package.json +++ b/lodash.over/package.json @@ -1,6 +1,6 @@ { "name": "lodash.over", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.over` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,14 +9,14 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseflatten": "^4.0.0", - "lodash._baseiteratee": "^4.0.0", + "lodash._baseflatten": "~4.1.0", + "lodash._baseiteratee": "~4.5.0", "lodash.rest": "^4.0.0" } } diff --git a/lodash.overargs/README.md b/lodash.overargs/README.md index 767b74ae0..0cda820d1 100644 --- a/lodash.overargs/README.md +++ b/lodash.overargs/README.md @@ -1,4 +1,4 @@ -# lodash.overargs v4.2.0 +# lodash.overargs v4.2.1 The [lodash](https://lodash.com/) method `_.overArgs` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var overArgs = require('lodash.overargs'); ``` -See the [documentation](https://lodash.com/docs#overArgs) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.overargs) for more details. +See the [documentation](https://lodash.com/docs#overArgs) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.overargs) for more details. diff --git a/lodash.overargs/index.js b/lodash.overargs/index.js index fb689d0bf..1059ba45e 100644 --- a/lodash.overargs/index.js +++ b/lodash.overargs/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.overargs/package.json b/lodash.overargs/package.json index cf9857a12..cc046ad2a 100644 --- a/lodash.overargs/package.json +++ b/lodash.overargs/package.json @@ -1,6 +1,6 @@ { "name": "lodash.overargs", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.overArgs` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,14 +9,14 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseflatten": "^4.0.0", - "lodash._baseiteratee": "^4.0.0", + "lodash._baseflatten": "~4.1.0", + "lodash._baseiteratee": "~4.5.0", "lodash.rest": "^4.0.0" } } diff --git a/lodash.overevery/README.md b/lodash.overevery/README.md index 52370aa52..2ca57c8de 100644 --- a/lodash.overevery/README.md +++ b/lodash.overevery/README.md @@ -1,4 +1,4 @@ -# lodash.overevery v4.2.0 +# lodash.overevery v4.2.1 The [lodash](https://lodash.com/) method `_.overEvery` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var overEvery = require('lodash.overevery'); ``` -See the [documentation](https://lodash.com/docs#overEvery) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.overevery) for more details. +See the [documentation](https://lodash.com/docs#overEvery) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.overevery) for more details. diff --git a/lodash.overevery/index.js b/lodash.overevery/index.js index f04d5977e..582739d4e 100644 --- a/lodash.overevery/index.js +++ b/lodash.overevery/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.overevery/package.json b/lodash.overevery/package.json index f41bed46b..86d84be36 100644 --- a/lodash.overevery/package.json +++ b/lodash.overevery/package.json @@ -1,6 +1,6 @@ { "name": "lodash.overevery", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.overEvery` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,14 +9,14 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseflatten": "^4.0.0", - "lodash._baseiteratee": "^4.0.0", + "lodash._baseflatten": "~4.1.0", + "lodash._baseiteratee": "~4.5.0", "lodash.rest": "^4.0.0" } } diff --git a/lodash.oversome/README.md b/lodash.oversome/README.md index 467db623d..d99e7c509 100644 --- a/lodash.oversome/README.md +++ b/lodash.oversome/README.md @@ -1,4 +1,4 @@ -# lodash.oversome v4.2.0 +# lodash.oversome v4.2.1 The [lodash](https://lodash.com/) method `_.overSome` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var overSome = require('lodash.oversome'); ``` -See the [documentation](https://lodash.com/docs#overSome) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.oversome) for more details. +See the [documentation](https://lodash.com/docs#overSome) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.oversome) for more details. diff --git a/lodash.oversome/index.js b/lodash.oversome/index.js index a1f1a123e..5f083b831 100644 --- a/lodash.oversome/index.js +++ b/lodash.oversome/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.oversome/package.json b/lodash.oversome/package.json index f96c9c5bd..2a92c537e 100644 --- a/lodash.oversome/package.json +++ b/lodash.oversome/package.json @@ -1,6 +1,6 @@ { "name": "lodash.oversome", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.overSome` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,14 +9,14 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseflatten": "^4.0.0", - "lodash._baseiteratee": "^4.0.0", + "lodash._baseflatten": "~4.1.0", + "lodash._baseiteratee": "~4.5.0", "lodash.rest": "^4.0.0" } } diff --git a/lodash.partial/README.md b/lodash.partial/README.md index 2257eb340..5c684243a 100644 --- a/lodash.partial/README.md +++ b/lodash.partial/README.md @@ -1,4 +1,4 @@ -# lodash.partial v4.2.0 +# lodash.partial v4.2.1 The [lodash](https://lodash.com/) method `_.partial` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var partial = require('lodash.partial'); ``` -See the [documentation](https://lodash.com/docs#partial) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.partial) for more details. +See the [documentation](https://lodash.com/docs#partial) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.partial) for more details. diff --git a/lodash.partial/index.js b/lodash.partial/index.js index 569d5466c..f08fea05e 100644 --- a/lodash.partial/index.js +++ b/lodash.partial/index.js @@ -51,7 +51,7 @@ var funcTag = '[object Function]', /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; @@ -136,7 +136,7 @@ function arrayEach(array, iteratee) { * specifying an index to search from. * * @private - * @param {Array} [array] The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ @@ -150,7 +150,7 @@ function arrayIncludes(array, value) { * support for iteratee shorthands. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. @@ -172,7 +172,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) { * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -280,7 +280,8 @@ function replaceHolders(array, placeholder) { } /** Used for built-in method references. */ -var objectProto = Object.prototype; +var funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; @@ -292,14 +293,14 @@ var maskSrcKey = (function() { }()); /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -505,7 +506,7 @@ function createBind(func, bitmask, thisArg) { function createCtor(Ctor) { 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 + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -999,15 +1000,14 @@ var partial = baseRest(function(func, partials) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -1124,7 +1124,7 @@ function toFinite(value) { * Converts `value` to an integer. * * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -1184,7 +1184,7 @@ function toNumber(value) { return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { diff --git a/lodash.partial/package.json b/lodash.partial/package.json index 72be6e1d2..19c0e535b 100644 --- a/lodash.partial/package.json +++ b/lodash.partial/package.json @@ -1,6 +1,6 @@ { "name": "lodash.partial", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.partial` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.partialright/README.md b/lodash.partialright/README.md index 84701e91a..453cb8511 100644 --- a/lodash.partialright/README.md +++ b/lodash.partialright/README.md @@ -1,4 +1,4 @@ -# lodash.partialright v4.2.0 +# lodash.partialright v4.2.1 The [lodash](https://lodash.com/) method `_.partialRight` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var partialRight = require('lodash.partialright'); ``` -See the [documentation](https://lodash.com/docs#partialRight) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.partialright) for more details. +See the [documentation](https://lodash.com/docs#partialRight) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.partialright) for more details. diff --git a/lodash.partialright/index.js b/lodash.partialright/index.js index 6d532b127..7e636fa83 100644 --- a/lodash.partialright/index.js +++ b/lodash.partialright/index.js @@ -51,7 +51,7 @@ var funcTag = '[object Function]', /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; @@ -136,7 +136,7 @@ function arrayEach(array, iteratee) { * specifying an index to search from. * * @private - * @param {Array} [array] The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ @@ -150,7 +150,7 @@ function arrayIncludes(array, value) { * support for iteratee shorthands. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. @@ -172,7 +172,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) { * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -280,7 +280,8 @@ function replaceHolders(array, placeholder) { } /** Used for built-in method references. */ -var objectProto = Object.prototype; +var funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; @@ -292,14 +293,14 @@ var maskSrcKey = (function() { }()); /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -505,7 +506,7 @@ function createBind(func, bitmask, thisArg) { function createCtor(Ctor) { 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 + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -998,15 +999,14 @@ var partialRight = baseRest(function(func, partials) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -1123,7 +1123,7 @@ function toFinite(value) { * Converts `value` to an integer. * * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -1183,7 +1183,7 @@ function toNumber(value) { return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { diff --git a/lodash.partialright/package.json b/lodash.partialright/package.json index 442119564..33e2aece4 100644 --- a/lodash.partialright/package.json +++ b/lodash.partialright/package.json @@ -1,6 +1,6 @@ { "name": "lodash.partialright", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.partialRight` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.partition/README.md b/lodash.partition/README.md index f42e14560..ce874f83c 100644 --- a/lodash.partition/README.md +++ b/lodash.partition/README.md @@ -1,4 +1,4 @@ -# lodash.partition v4.2.0 +# lodash.partition v4.2.1 The [lodash](https://lodash.com/) method `_.partition` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var partition = require('lodash.partition'); ``` -See the [documentation](https://lodash.com/docs#partition) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.partition) for more details. +See the [documentation](https://lodash.com/docs#partition) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.partition) for more details. diff --git a/lodash.partition/index.js b/lodash.partition/index.js index 8ede91299..31ada38a3 100644 --- a/lodash.partition/index.js +++ b/lodash.partition/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.partition/package.json b/lodash.partition/package.json index be7ad6115..74451b44e 100644 --- a/lodash.partition/package.json +++ b/lodash.partition/package.json @@ -1,6 +1,6 @@ { "name": "lodash.partition", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.partition` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseeach": "^4.0.0", - "lodash._baseiteratee": "^4.0.0" + "lodash._baseeach": "~4.1.0", + "lodash._baseiteratee": "~4.5.0" } } diff --git a/lodash.pick/README.md b/lodash.pick/README.md index 82e4a6270..e1d88d61b 100644 --- a/lodash.pick/README.md +++ b/lodash.pick/README.md @@ -1,4 +1,4 @@ -# lodash.pick v4.2.0 +# lodash.pick v4.2.1 The [lodash](https://lodash.com/) method `_.pick` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var pick = require('lodash.pick'); ``` -See the [documentation](https://lodash.com/docs#pick) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.pick) for more details. +See the [documentation](https://lodash.com/docs#pick) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.pick) for more details. diff --git a/lodash.pick/index.js b/lodash.pick/index.js index 562370a98..d1f8e5dd1 100644 --- a/lodash.pick/index.js +++ b/lodash.pick/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -9,6 +9,32 @@ var baseFlatten = require('lodash._baseflatten'), rest = require('lodash.rest'); +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + /** * A specialized version of `_.reduce` for arrays without support for * iteratee shorthands. @@ -34,6 +60,16 @@ function arrayReduce(array, iteratee, accumulator, initAccum) { return accumulator; } +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + /** * The base implementation of `_.pick` without support for individual * property identifiers. @@ -53,6 +89,72 @@ function basePick(object, props) { }, {}); } +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + /** * Creates an object composed of the picked `object` properties. * @@ -71,7 +173,7 @@ function basePick(object, props) { * // => { 'a': 1, 'c': 3 } */ var pick = rest(function(object, props) { - return object == null ? {} : basePick(object, baseFlatten(props, 1)); + return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey)); }); module.exports = pick; diff --git a/lodash.pick/package.json b/lodash.pick/package.json index bb99a4921..28dee0334 100644 --- a/lodash.pick/package.json +++ b/lodash.pick/package.json @@ -1,6 +1,6 @@ { "name": "lodash.pick", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.pick` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.pickby/README.md b/lodash.pickby/README.md index 70c278b03..1b3663676 100644 --- a/lodash.pickby/README.md +++ b/lodash.pickby/README.md @@ -1,4 +1,4 @@ -# lodash.pickby v4.2.0 +# lodash.pickby v4.2.1 The [lodash](https://lodash.com/) method `_.pickBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var pickBy = require('lodash.pickby'); ``` -See the [documentation](https://lodash.com/docs#pickBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.pickby) for more details. +See the [documentation](https://lodash.com/docs#pickBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.pickby) for more details. diff --git a/lodash.pickby/index.js b/lodash.pickby/index.js index 1837f5228..b2b00e9b3 100644 --- a/lodash.pickby/index.js +++ b/lodash.pickby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -58,7 +58,7 @@ function basePickBy(object, predicate) { * // => { 'a': 1, 'c': 3 } */ function pickBy(object, predicate) { - return object == null ? {} : basePickBy(object, baseIteratee(predicate, 2)); + return object == null ? {} : basePickBy(object, baseIteratee(predicate)); } module.exports = pickBy; diff --git a/lodash.pickby/package.json b/lodash.pickby/package.json index 12476d985..767b3ebfa 100644 --- a/lodash.pickby/package.json +++ b/lodash.pickby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.pickby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.pickBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.property/README.md b/lodash.property/README.md index 31c8b112d..bc7ad591c 100644 --- a/lodash.property/README.md +++ b/lodash.property/README.md @@ -1,4 +1,4 @@ -# lodash.property v4.2.0 +# lodash.property v4.2.1 The [lodash](https://lodash.com/) method `_.property` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var property = require('lodash.property'); ``` -See the [documentation](https://lodash.com/docs#property) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.property) for more details. +See the [documentation](https://lodash.com/docs#property) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.property) for more details. diff --git a/lodash.property/index.js b/lodash.property/index.js index 8fae1c266..f24329b66 100644 --- a/lodash.property/index.js +++ b/lodash.property/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -25,17 +25,6 @@ var objectProto = Object.prototype; */ var objectToString = objectProto.toString; -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast property path array. - */ -function baseCastPath(value) { - return isArray(value) ? value : stringToPath(value); -} - /** * The base implementation of `_.get` without support for default values. * @@ -45,7 +34,7 @@ function baseCastPath(value) { * @returns {*} Returns the resolved value. */ function baseGet(object, path) { - path = isKey(path, object) ? [path] : baseCastPath(path); + path = isKey(path, object) ? [path] : castPath(path); var index = 0, length = path.length; @@ -82,6 +71,17 @@ function basePropertyDeep(path) { }; } +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + /** * Checks if `value` is a property name and not a property path. * diff --git a/lodash.property/package.json b/lodash.property/package.json index 7457bfed7..b385b9f97 100644 --- a/lodash.property/package.json +++ b/lodash.property/package.json @@ -1,6 +1,6 @@ { "name": "lodash.property", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.property` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.propertyof/README.md b/lodash.propertyof/README.md index 0cdd9fa5f..b6fad274a 100644 --- a/lodash.propertyof/README.md +++ b/lodash.propertyof/README.md @@ -1,4 +1,4 @@ -# lodash.propertyof v4.2.0 +# lodash.propertyof v4.2.1 The [lodash](https://lodash.com/) method `_.propertyOf` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var propertyOf = require('lodash.propertyof'); ``` -See the [documentation](https://lodash.com/docs#propertyOf) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.propertyof) for more details. +See the [documentation](https://lodash.com/docs#propertyOf) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.propertyof) for more details. diff --git a/lodash.propertyof/index.js b/lodash.propertyof/index.js index 9b4e56f2a..21ac4697c 100644 --- a/lodash.propertyof/index.js +++ b/lodash.propertyof/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -25,17 +25,6 @@ var objectProto = Object.prototype; */ var objectToString = objectProto.toString; -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast property path array. - */ -function baseCastPath(value) { - return isArray(value) ? value : stringToPath(value); -} - /** * The base implementation of `_.get` without support for default values. * @@ -45,7 +34,7 @@ function baseCastPath(value) { * @returns {*} Returns the resolved value. */ function baseGet(object, path) { - path = isKey(path, object) ? [path] : baseCastPath(path); + path = isKey(path, object) ? [path] : castPath(path); var index = 0, length = path.length; @@ -56,6 +45,17 @@ function baseGet(object, path) { return (index && index == length) ? object : undefined; } +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + /** * Checks if `value` is a property name and not a property path. * diff --git a/lodash.propertyof/package.json b/lodash.propertyof/package.json index a0b7d4237..30af95ccd 100644 --- a/lodash.propertyof/package.json +++ b/lodash.propertyof/package.json @@ -1,6 +1,6 @@ { "name": "lodash.propertyof", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.propertyOf` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.reduce/README.md b/lodash.reduce/README.md index 1b4b8a668..3fe7e5c7f 100644 --- a/lodash.reduce/README.md +++ b/lodash.reduce/README.md @@ -1,4 +1,4 @@ -# lodash.reduce v4.2.0 +# lodash.reduce v4.2.1 The [lodash](https://lodash.com/) method `_.reduce` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var reduce = require('lodash.reduce'); ``` -See the [documentation](https://lodash.com/docs#reduce) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.reduce) for more details. +See the [documentation](https://lodash.com/docs#reduce) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.reduce) for more details. diff --git a/lodash.reduce/index.js b/lodash.reduce/index.js index 807f44ee5..6ee8ef596 100644 --- a/lodash.reduce/index.js +++ b/lodash.reduce/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.reduce/package.json b/lodash.reduce/package.json index 5b7e2ad0a..b4c3de8dc 100644 --- a/lodash.reduce/package.json +++ b/lodash.reduce/package.json @@ -1,6 +1,6 @@ { "name": "lodash.reduce", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.reduce` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,14 +9,14 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseeach": "^4.0.0", - "lodash._baseiteratee": "^4.0.0", - "lodash._basereduce": "^3.0.0" + "lodash._baseeach": "~4.1.0", + "lodash._baseiteratee": "~4.5.0", + "lodash._basereduce": "~3.0.0" } } diff --git a/lodash.reduceright/README.md b/lodash.reduceright/README.md index d628566c7..07fd9ae19 100644 --- a/lodash.reduceright/README.md +++ b/lodash.reduceright/README.md @@ -1,4 +1,4 @@ -# lodash.reduceright v4.2.0 +# lodash.reduceright v4.2.1 The [lodash](https://lodash.com/) method `_.reduceRight` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var reduceRight = require('lodash.reduceright'); ``` -See the [documentation](https://lodash.com/docs#reduceRight) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.reduceright) for more details. +See the [documentation](https://lodash.com/docs#reduceRight) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.reduceright) for more details. diff --git a/lodash.reduceright/index.js b/lodash.reduceright/index.js index 54bf9561a..c7dc71dc7 100644 --- a/lodash.reduceright/index.js +++ b/lodash.reduceright/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.reduceright/package.json b/lodash.reduceright/package.json index ea4ffacae..b59e4181b 100644 --- a/lodash.reduceright/package.json +++ b/lodash.reduceright/package.json @@ -1,6 +1,6 @@ { "name": "lodash.reduceright", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.reduceRight` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,14 +9,14 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseeachright": "^4.0.0", - "lodash._baseiteratee": "^4.0.0", - "lodash._basereduce": "^3.0.0" + "lodash._baseeachright": "~4.1.0", + "lodash._baseiteratee": "~4.5.0", + "lodash._basereduce": "~3.0.0" } } diff --git a/lodash.reject/README.md b/lodash.reject/README.md index 05084c642..ee101a834 100644 --- a/lodash.reject/README.md +++ b/lodash.reject/README.md @@ -1,4 +1,4 @@ -# lodash.reject v4.2.0 +# lodash.reject v4.2.1 The [lodash](https://lodash.com/) method `_.reject` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var reject = require('lodash.reject'); ``` -See the [documentation](https://lodash.com/docs#reject) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.reject) for more details. +See the [documentation](https://lodash.com/docs#reject) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.reject) for more details. diff --git a/lodash.reject/index.js b/lodash.reject/index.js index 6c13dbe48..47115f944 100644 --- a/lodash.reject/index.js +++ b/lodash.reject/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -21,13 +21,13 @@ var baseFilter = require('lodash._basefilter'), function arrayFilter(array, predicate) { var index = -1, length = array.length, - resIndex = -1, + resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { - result[++resIndex] = value; + result[resIndex++] = value; } } return result; diff --git a/lodash.reject/package.json b/lodash.reject/package.json index 2a89754e3..b17ffc878 100644 --- a/lodash.reject/package.json +++ b/lodash.reject/package.json @@ -1,6 +1,6 @@ { "name": "lodash.reject", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.reject` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.remove/README.md b/lodash.remove/README.md index b761b1666..bcf77537e 100644 --- a/lodash.remove/README.md +++ b/lodash.remove/README.md @@ -1,4 +1,4 @@ -# lodash.remove v4.2.0 +# lodash.remove v4.2.1 The [lodash](https://lodash.com/) method `_.remove` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var remove = require('lodash.remove'); ``` -See the [documentation](https://lodash.com/docs#remove) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.remove) for more details. +See the [documentation](https://lodash.com/docs#remove) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.remove) for more details. diff --git a/lodash.remove/index.js b/lodash.remove/index.js index e8f57ee2f..f3810435a 100644 --- a/lodash.remove/index.js +++ b/lodash.remove/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.remove/package.json b/lodash.remove/package.json index 8b88f732f..b6c24ed29 100644 --- a/lodash.remove/package.json +++ b/lodash.remove/package.json @@ -1,6 +1,6 @@ { "name": "lodash.remove", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.remove` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0", - "lodash._basepullat": "^4.0.0" + "lodash._baseiteratee": "~4.5.0", + "lodash._basepullat": "~4.2.0" } } diff --git a/lodash.result/README.md b/lodash.result/README.md index 8d7eb3a20..24df6e0d3 100644 --- a/lodash.result/README.md +++ b/lodash.result/README.md @@ -1,4 +1,4 @@ -# lodash.result v4.2.0 +# lodash.result v4.2.1 The [lodash](https://lodash.com/) method `_.result` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var result = require('lodash.result'); ``` -See the [documentation](https://lodash.com/docs#result) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.result) for more details. +See the [documentation](https://lodash.com/docs#result) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.result) for more details. diff --git a/lodash.result/index.js b/lodash.result/index.js index 8a348a193..0c23cc479 100644 --- a/lodash.result/index.js +++ b/lodash.result/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.result/package.json b/lodash.result/package.json index 3209d0389..75fec20c7 100644 --- a/lodash.result/package.json +++ b/lodash.result/package.json @@ -1,6 +1,6 @@ { "name": "lodash.result", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.result` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseslice": "^4.0.0", + "lodash._baseslice": "~4.0.0", "lodash.tostring": "^4.0.0" } } diff --git a/lodash.sample/README.md b/lodash.sample/README.md index 00be507b3..9e4925f5c 100644 --- a/lodash.sample/README.md +++ b/lodash.sample/README.md @@ -1,4 +1,4 @@ -# lodash.sample v4.2.0 +# lodash.sample v4.2.1 The [lodash](https://lodash.com/) method `_.sample` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var sample = require('lodash.sample'); ``` -See the [documentation](https://lodash.com/docs#sample) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.sample) for more details. +See the [documentation](https://lodash.com/docs#sample) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.sample) for more details. diff --git a/lodash.sample/index.js b/lodash.sample/index.js index 02d8f857f..065da8a0f 100644 --- a/lodash.sample/index.js +++ b/lodash.sample/index.js @@ -13,8 +13,7 @@ var MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - stringTag = '[object String]'; + genTag = '[object GeneratorFunction]'; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; @@ -39,19 +38,6 @@ function arrayMap(array, iteratee) { return result; } -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. @@ -88,7 +74,7 @@ function baseValues(object, props) { } /** - * Creates a function that invokes `func` with its first argument transformed. + * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. @@ -109,7 +95,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -119,36 +105,55 @@ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeFloor = Math.floor, - nativeGetPrototype = Object.getPrototypeOf, - nativeKeys = Object.keys, + nativeKeys = overArg(Object.keys, Object), nativeRandom = Math.random; /** - * The base implementation of `_.has` without support for deep paths. + * Creates an array of the enumerable property names of the array-like `value`. * * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. */ -function baseHas(object, key) { - // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, - // that are composed entirely of index properties, return `false` for - // `hasOwnProperty` checks of them. - return object != null && - (hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototype(object) === null)); +function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; } /** - * The base implementation of `_.keys` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ -var baseKeys = overArg(nativeKeys, Object); +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} /** * The base implementation of `_.random` without support for returning @@ -163,45 +168,6 @@ function baseRandom(lower, upper) { return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); } -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a - * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects - * Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Gets the `[[Prototype]]` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {null|Object} Returns the `[[Prototype]]`. - */ -var getPrototype = overArg(nativeGetPrototype, Object); - -/** - * Creates an array of index keys for `object` values of arrays, - * `arguments` objects, and strings, otherwise `null` is returned. - * - * @private - * @param {Object} object The object to query. - * @returns {Array|null} Returns index keys, else `null`. - */ -function indexKeys(object) { - var length = object ? object.length : undefined; - if (isLength(length) && - (isArray(object) || isString(object) || isArguments(object))) { - return baseTimes(length, String); - } - return null; -} - /** * Checks if `value` is a valid array-like index. * @@ -271,7 +237,7 @@ function sample(collection) { * // => false */ function isArguments(value) { - // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); } @@ -327,7 +293,7 @@ var isArray = Array.isArray; * // => false */ function isArrayLike(value) { - return value != null && isLength(getLength(value)) && !isFunction(value); + return value != null && isLength(value.length) && !isFunction(value); } /** @@ -378,8 +344,7 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } @@ -387,16 +352,15 @@ function isFunction(value) { /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); @@ -418,7 +382,7 @@ function isLength(value) { /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -474,33 +438,11 @@ function isObjectLike(value) { return !!value && typeof value == 'object'; } -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); -} - /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static @@ -525,23 +467,7 @@ function isString(value) { * // => ['0', '1'] */ function keys(object) { - var isProto = isPrototype(object); - if (!(isProto || isArrayLike(object))) { - return baseKeys(object); - } - var indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - for (var key in object) { - if (baseHas(object, key) && - !(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(isProto && key == 'constructor')) { - result.push(key); - } - } - return result; + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } /** diff --git a/lodash.sample/package.json b/lodash.sample/package.json index 23f8fd9ed..1fa8ff61d 100644 --- a/lodash.sample/package.json +++ b/lodash.sample/package.json @@ -1,6 +1,6 @@ { "name": "lodash.sample", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.sample` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.some/README.md b/lodash.some/README.md index 9afcee7f6..ffcb96888 100644 --- a/lodash.some/README.md +++ b/lodash.some/README.md @@ -1,4 +1,4 @@ -# lodash.some v4.2.0 +# lodash.some v4.2.1 The [lodash](https://lodash.com/) method `_.some` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var some = require('lodash.some'); ``` -See the [documentation](https://lodash.com/docs#some) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.some) for more details. +See the [documentation](https://lodash.com/docs#some) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.some) for more details. diff --git a/lodash.some/index.js b/lodash.some/index.js index 7fe1eca45..83eaf42c0 100644 --- a/lodash.some/index.js +++ b/lodash.some/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -254,8 +254,7 @@ var isArray = Array.isArray; * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -276,8 +275,8 @@ function isArrayLike(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.some/package.json b/lodash.some/package.json index 7832a5214..55d1907ff 100644 --- a/lodash.some/package.json +++ b/lodash.some/package.json @@ -1,6 +1,6 @@ { "name": "lodash.some", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.some` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.sortby/README.md b/lodash.sortby/README.md index 3849c27d8..4da1fd7cb 100644 --- a/lodash.sortby/README.md +++ b/lodash.sortby/README.md @@ -1,4 +1,4 @@ -# lodash.sortby v4.2.0 +# lodash.sortby v4.2.1 The [lodash](https://lodash.com/) method `_.sortBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var sortBy = require('lodash.sortby'); ``` -See the [documentation](https://lodash.com/docs#sortBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.sortby) for more details. +See the [documentation](https://lodash.com/docs#sortBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.sortby) for more details. diff --git a/lodash.sortby/index.js b/lodash.sortby/index.js index 1fb7a87bb..21a8620c5 100644 --- a/lodash.sortby/index.js +++ b/lodash.sortby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -42,9 +42,9 @@ function arrayMap(array, iteratee) { } /** - * The base implementation of `_.sortBy` which uses `comparer` to define - * the sort order of `array` and replaces criteria objects with their - * corresponding values. + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. * * @private * @param {Array} array The array to sort. @@ -185,12 +185,8 @@ function baseMap(collection, iteratee) { * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { - var index = -1, - toIteratee = baseIteratee; - - iteratees = arrayMap(iteratees.length ? iteratees : Array(1), function(iteratee) { - return toIteratee(iteratee); - }); + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : Array(1), baseIteratee); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { @@ -356,8 +352,7 @@ function eq(value, other) { * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -378,8 +373,8 @@ function isArrayLike(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.sortby/package.json b/lodash.sortby/package.json index ed9e80484..e450c96b0 100644 --- a/lodash.sortby/package.json +++ b/lodash.sortby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.sortby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.sortBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.sortedindexby/README.md b/lodash.sortedindexby/README.md index 7e2496e46..8dfec0e4b 100644 --- a/lodash.sortedindexby/README.md +++ b/lodash.sortedindexby/README.md @@ -1,4 +1,4 @@ -# lodash.sortedindexby v4.2.0 +# lodash.sortedindexby v4.2.1 The [lodash](https://lodash.com/) method `_.sortedIndexBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var sortedIndexBy = require('lodash.sortedindexby'); ``` -See the [documentation](https://lodash.com/docs#sortedIndexBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.sortedindexby) for more details. +See the [documentation](https://lodash.com/docs#sortedIndexBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.sortedindexby) for more details. diff --git a/lodash.sortedindexby/index.js b/lodash.sortedindexby/index.js index 4dccb1c3b..16abcf77c 100644 --- a/lodash.sortedindexby/index.js +++ b/lodash.sortedindexby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.sortedindexby/package.json b/lodash.sortedindexby/package.json index c8bd9eb52..1a1362a9a 100644 --- a/lodash.sortedindexby/package.json +++ b/lodash.sortedindexby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.sortedindexby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.sortedIndexBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0", - "lodash._basesortedindexby": "^4.0.0" + "lodash._baseiteratee": "~4.5.0", + "lodash._basesortedindexby": "~4.0.0" } } diff --git a/lodash.sortedlastindexby/README.md b/lodash.sortedlastindexby/README.md index b76e12d72..2fd0ac3a8 100644 --- a/lodash.sortedlastindexby/README.md +++ b/lodash.sortedlastindexby/README.md @@ -1,4 +1,4 @@ -# lodash.sortedlastindexby v4.2.0 +# lodash.sortedlastindexby v4.2.1 The [lodash](https://lodash.com/) method `_.sortedLastIndexBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var sortedLastIndexBy = require('lodash.sortedlastindexby'); ``` -See the [documentation](https://lodash.com/docs#sortedLastIndexBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.sortedlastindexby) for more details. +See the [documentation](https://lodash.com/docs#sortedLastIndexBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.sortedlastindexby) for more details. diff --git a/lodash.sortedlastindexby/index.js b/lodash.sortedlastindexby/index.js index 3c37a8902..1e8f951fa 100644 --- a/lodash.sortedlastindexby/index.js +++ b/lodash.sortedlastindexby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.sortedlastindexby/package.json b/lodash.sortedlastindexby/package.json index 126f06988..02f8d2a29 100644 --- a/lodash.sortedlastindexby/package.json +++ b/lodash.sortedlastindexby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.sortedlastindexby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.sortedLastIndexBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0", - "lodash._basesortedindexby": "^4.0.0" + "lodash._baseiteratee": "~4.5.0", + "lodash._basesortedindexby": "~4.0.0" } } diff --git a/lodash.sorteduniqby/README.md b/lodash.sorteduniqby/README.md index 2661431bd..7ed71fd0a 100644 --- a/lodash.sorteduniqby/README.md +++ b/lodash.sorteduniqby/README.md @@ -1,4 +1,4 @@ -# lodash.sorteduniqby v4.2.0 +# lodash.sorteduniqby v4.2.1 The [lodash](https://lodash.com/) method `_.sortedUniqBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var sortedUniqBy = require('lodash.sorteduniqby'); ``` -See the [documentation](https://lodash.com/docs#sortedUniqBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.sorteduniqby) for more details. +See the [documentation](https://lodash.com/docs#sortedUniqBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.sorteduniqby) for more details. diff --git a/lodash.sorteduniqby/index.js b/lodash.sorteduniqby/index.js index d467fa482..e9268e951 100644 --- a/lodash.sorteduniqby/index.js +++ b/lodash.sorteduniqby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.sorteduniqby/package.json b/lodash.sorteduniqby/package.json index b0c4a30a5..559d7419f 100644 --- a/lodash.sorteduniqby/package.json +++ b/lodash.sorteduniqby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.sorteduniqby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.sortedUniqBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0", - "lodash._basesorteduniqby": "^4.0.0" + "lodash._baseiteratee": "~4.5.0", + "lodash._basesorteduniqby": "~4.0.0" } } diff --git a/lodash.split/README.md b/lodash.split/README.md index 1d88cbe99..682b41fb1 100644 --- a/lodash.split/README.md +++ b/lodash.split/README.md @@ -1,4 +1,4 @@ -# lodash.split v4.2.0 +# lodash.split v4.2.1 The [lodash](https://lodash.com/) method `_.split` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var split = require('lodash.split'); ``` -See the [documentation](https://lodash.com/docs#split) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.split) for more details. +See the [documentation](https://lodash.com/docs#split) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.split) for more details. diff --git a/lodash.split/index.js b/lodash.split/index.js index 8f09d7471..cd0be792e 100644 --- a/lodash.split/index.js +++ b/lodash.split/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -78,7 +78,8 @@ function stringToArray(string) { } /** Used for built-in method references. */ -var objectProto = Object.prototype; +var objectProto = Object.prototype, + stringProto = String.prototype; /** * Used to resolve the @@ -87,6 +88,9 @@ var objectProto = Object.prototype; */ var objectToString = objectProto.toString; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeSplit = stringProto.split; + /** * The base implementation of `_.property` without support for deep paths. * @@ -364,7 +368,7 @@ function split(string, separator, limit) { return castSlice(stringToArray(string), 0, limit); } } - return string.split(separator, limit); + return nativeSplit.call(string, separator, limit); } module.exports = split; diff --git a/lodash.split/package.json b/lodash.split/package.json index 4ae48c303..9cbee28bd 100644 --- a/lodash.split/package.json +++ b/lodash.split/package.json @@ -1,6 +1,6 @@ { "name": "lodash.split", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.split` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.spread/README.md b/lodash.spread/README.md index a93d47e75..b6869c7cc 100644 --- a/lodash.spread/README.md +++ b/lodash.spread/README.md @@ -1,4 +1,4 @@ -# lodash.spread v4.2.0 +# lodash.spread v4.2.1 The [lodash](https://lodash.com/) method `_.spread` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var spread = require('lodash.spread'); ``` -See the [documentation](https://lodash.com/docs#spread) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.spread) for more details. +See the [documentation](https://lodash.com/docs#spread) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.spread) for more details. diff --git a/lodash.spread/index.js b/lodash.spread/index.js index f297de3e4..c69339b5d 100644 --- a/lodash.spread/index.js +++ b/lodash.spread/index.js @@ -16,9 +16,7 @@ var INFINITY = 1 / 0, NAN = 0 / 0; /** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - symbolTag = '[object Symbol]'; +var symbolTag = '[object Symbol]'; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; @@ -79,7 +77,7 @@ var objectProto = Object.prototype; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -164,7 +162,7 @@ function castSlice(array, start, end) { /** * Creates a function that invokes `func` with the `this` binding of the * create function and an array of arguments much like - * [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply). + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). * * **Note:** This method is based on the * [spread operator](https://mdn.io/spread_operator). @@ -211,34 +209,9 @@ function spread(func, start) { }); } -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -355,7 +328,7 @@ function toFinite(value) { * Converts `value` to an integer. * * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -415,7 +388,7 @@ function toNumber(value) { return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { diff --git a/lodash.spread/package.json b/lodash.spread/package.json index 33c9483d3..28d9a9ecb 100644 --- a/lodash.spread/package.json +++ b/lodash.spread/package.json @@ -1,6 +1,6 @@ { "name": "lodash.spread", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.spread` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.startcase/README.md b/lodash.startcase/README.md index f0a89c148..ef7584557 100644 --- a/lodash.startcase/README.md +++ b/lodash.startcase/README.md @@ -1,4 +1,4 @@ -# lodash.startcase v4.2.0 +# lodash.startcase v4.2.1 The [lodash](https://lodash.com/) method `_.startCase` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var startCase = require('lodash.startcase'); ``` -See the [documentation](https://lodash.com/docs#startCase) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.startcase) for more details. +See the [documentation](https://lodash.com/docs#startCase) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.startcase) for more details. diff --git a/lodash.startcase/index.js b/lodash.startcase/index.js index 9667f98b3..607937273 100644 --- a/lodash.startcase/index.js +++ b/lodash.startcase/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -10,6 +10,12 @@ var deburr = require('lodash.deburr'), upperFirst = require('lodash.upperfirst'), words = require('lodash.words'); +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]"; + +/** Used to match apostrophes. */ +var reApos = RegExp(rsApos, 'g'); + /** * A specialized version of `_.reduce` for arrays without support for * iteratee shorthands. @@ -44,7 +50,7 @@ function arrayReduce(array, iteratee, accumulator, initAccum) { */ function createCompounder(callback) { return function(string) { - return arrayReduce(words(deburr(string)), callback, ''); + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); }; } diff --git a/lodash.startcase/package.json b/lodash.startcase/package.json index 324adaf9a..8fd481bdd 100644 --- a/lodash.startcase/package.json +++ b/lodash.startcase/package.json @@ -1,6 +1,6 @@ { "name": "lodash.startcase", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.startCase` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.startswith/README.md b/lodash.startswith/README.md index 0ad94219b..3a1130d24 100644 --- a/lodash.startswith/README.md +++ b/lodash.startswith/README.md @@ -1,4 +1,4 @@ -# lodash.startswith v4.2.0 +# lodash.startswith v4.2.1 The [lodash](https://lodash.com/) method `_.startsWith` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var startsWith = require('lodash.startswith'); ``` -See the [documentation](https://lodash.com/docs#startsWith) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.startswith) for more details. +See the [documentation](https://lodash.com/docs#startsWith) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.startswith) for more details. diff --git a/lodash.startswith/index.js b/lodash.startswith/index.js index 2742bddc2..94b3f2b09 100644 --- a/lodash.startswith/index.js +++ b/lodash.startswith/index.js @@ -13,9 +13,7 @@ var INFINITY = 1 / 0, NAN = 0 / 0; /** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - symbolTag = '[object Symbol]'; +var symbolTag = '[object Symbol]'; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; @@ -46,7 +44,7 @@ var objectProto = Object.prototype; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -99,34 +97,9 @@ function baseToString(value) { return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -243,7 +216,7 @@ function toFinite(value) { * Converts `value` to an integer. * * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -303,7 +276,7 @@ function toNumber(value) { return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { @@ -348,7 +321,7 @@ function toString(value) { * @memberOf _ * @since 3.0.0 * @category String - * @param {string} [string=''] The string to search. + * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. * @param {number} [position=0] The position to search from. * @returns {boolean} Returns `true` if `string` starts with `target`, diff --git a/lodash.startswith/package.json b/lodash.startswith/package.json index 37ffb47ce..0d3fef7b1 100644 --- a/lodash.startswith/package.json +++ b/lodash.startswith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.startswith", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.startsWith` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.sumby/README.md b/lodash.sumby/README.md index 87a9f4796..d616b0b3f 100644 --- a/lodash.sumby/README.md +++ b/lodash.sumby/README.md @@ -1,4 +1,4 @@ -# lodash.sumby v4.2.0 +# lodash.sumby v4.2.1 The [lodash](https://lodash.com/) method `_.sumBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var sumBy = require('lodash.sumby'); ``` -See the [documentation](https://lodash.com/docs#sumBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.sumby) for more details. +See the [documentation](https://lodash.com/docs#sumBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.sumby) for more details. diff --git a/lodash.sumby/index.js b/lodash.sumby/index.js index bf5c6b1e4..0f29c8858 100644 --- a/lodash.sumby/index.js +++ b/lodash.sumby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.sumby/package.json b/lodash.sumby/package.json index 8e9341dd5..a8b74ead2 100644 --- a/lodash.sumby/package.json +++ b/lodash.sumby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.sumby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.sumBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,12 +9,12 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0" + "lodash._baseiteratee": "~4.5.0" } } diff --git a/lodash.takerightwhile/README.md b/lodash.takerightwhile/README.md index df862e982..23d21a0e2 100644 --- a/lodash.takerightwhile/README.md +++ b/lodash.takerightwhile/README.md @@ -1,4 +1,4 @@ -# lodash.takerightwhile v4.2.0 +# lodash.takerightwhile v4.2.1 The [lodash](https://lodash.com/) method `_.takeRightWhile` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var takeRightWhile = require('lodash.takerightwhile'); ``` -See the [documentation](https://lodash.com/docs#takeRightWhile) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.takerightwhile) for more details. +See the [documentation](https://lodash.com/docs#takeRightWhile) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.takerightwhile) for more details. diff --git a/lodash.takerightwhile/index.js b/lodash.takerightwhile/index.js index 1e97ca07c..ad4611c00 100644 --- a/lodash.takerightwhile/index.js +++ b/lodash.takerightwhile/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.takerightwhile/package.json b/lodash.takerightwhile/package.json index 74055b1d4..893f16181 100644 --- a/lodash.takerightwhile/package.json +++ b/lodash.takerightwhile/package.json @@ -1,6 +1,6 @@ { "name": "lodash.takerightwhile", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.takeRightWhile` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0", - "lodash._baseslice": "^4.0.0" + "lodash._baseiteratee": "~4.5.0", + "lodash._baseslice": "~4.0.0" } } diff --git a/lodash.takewhile/README.md b/lodash.takewhile/README.md index d7ef3355f..ef71b8fec 100644 --- a/lodash.takewhile/README.md +++ b/lodash.takewhile/README.md @@ -1,4 +1,4 @@ -# lodash.takewhile v4.2.0 +# lodash.takewhile v4.2.1 The [lodash](https://lodash.com/) method `_.takeWhile` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var takeWhile = require('lodash.takewhile'); ``` -See the [documentation](https://lodash.com/docs#takeWhile) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.takewhile) for more details. +See the [documentation](https://lodash.com/docs#takeWhile) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.takewhile) for more details. diff --git a/lodash.takewhile/index.js b/lodash.takewhile/index.js index 75b17fee6..0cd045eeb 100644 --- a/lodash.takewhile/index.js +++ b/lodash.takewhile/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.takewhile/package.json b/lodash.takewhile/package.json index d44d8472f..6312e4e7a 100644 --- a/lodash.takewhile/package.json +++ b/lodash.takewhile/package.json @@ -1,6 +1,6 @@ { "name": "lodash.takewhile", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.takeWhile` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0", - "lodash._baseslice": "^4.0.0" + "lodash._baseiteratee": "~4.5.0", + "lodash._baseslice": "~4.0.0" } } diff --git a/lodash.template/README.md b/lodash.template/README.md index 231eceb04..1b92bd937 100644 --- a/lodash.template/README.md +++ b/lodash.template/README.md @@ -1,4 +1,4 @@ -# lodash.template v4.2.0 +# lodash.template v4.2.1 The [lodash](https://lodash.com/) method `_.template` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var template = require('lodash.template'); ``` -See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.template) for more details. +See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.template) for more details. diff --git a/lodash.template/index.js b/lodash.template/index.js index a4a1ce6a5..0a1b57955 100644 --- a/lodash.template/index.js +++ b/lodash.template/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -291,9 +291,8 @@ function isError(value) { if (!isObjectLike(value)) { return false; } - var Ctor = value.constructor; return (objectToString.call(value) == errorTag) || - (typeof Ctor == 'function' && objectToString.call(Ctor.prototype) == errorTag); + (typeof value.message == 'string' && typeof value.name == 'string'); } /** diff --git a/lodash.template/package.json b/lodash.template/package.json index d1b2dc158..ba3659bdf 100644 --- a/lodash.template/package.json +++ b/lodash.template/package.json @@ -1,6 +1,6 @@ { "name": "lodash.template", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.template` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.toarray/README.md b/lodash.toarray/README.md index 8c1675697..8cc7a570a 100644 --- a/lodash.toarray/README.md +++ b/lodash.toarray/README.md @@ -1,4 +1,4 @@ -# lodash.toarray v4.2.0 +# lodash.toarray v4.2.1 The [lodash](https://lodash.com/) method `_.toArray` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var toArray = require('lodash.toarray'); ``` -See the [documentation](https://lodash.com/docs#toArray) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.toarray) for more details. +See the [documentation](https://lodash.com/docs#toArray) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.toarray) for more details. diff --git a/lodash.toarray/index.js b/lodash.toarray/index.js index 1ccf77098..ed4d0b4af 100644 --- a/lodash.toarray/index.js +++ b/lodash.toarray/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -258,7 +258,7 @@ var getLength = baseProperty('length'); * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { - var value = object == null ? undefined : object[key]; + var value = object[key]; return isNative(value) ? value : undefined; } @@ -343,8 +343,7 @@ var isArray = Array.isArray; * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -365,8 +364,8 @@ function isArrayLike(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.toarray/package.json b/lodash.toarray/package.json index ad0447514..6ec9b1933 100644 --- a/lodash.toarray/package.json +++ b/lodash.toarray/package.json @@ -1,6 +1,6 @@ { "name": "lodash.toarray", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.toArray` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.transform/README.md b/lodash.transform/README.md index 0ed08890f..ecc51024c 100644 --- a/lodash.transform/README.md +++ b/lodash.transform/README.md @@ -1,4 +1,4 @@ -# lodash.transform v4.2.0 +# lodash.transform v4.2.1 The [lodash](https://lodash.com/) method `_.transform` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var transform = require('lodash.transform'); ``` -See the [documentation](https://lodash.com/docs#transform) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.transform) for more details. +See the [documentation](https://lodash.com/docs#transform) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.transform) for more details. diff --git a/lodash.transform/index.js b/lodash.transform/index.js index 258fda056..9feb5d442 100644 --- a/lodash.transform/index.js +++ b/lodash.transform/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -86,7 +86,8 @@ var objectProto = Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var objectCreate = Object.create; +var getPrototypeOf = Object.getPrototypeOf, + objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning @@ -155,8 +156,8 @@ var isArray = Array.isArray; */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } @@ -304,7 +305,7 @@ function transform(object, iteratee, accumulator) { if (isArr) { accumulator = isArray(object) ? new Ctor : []; } else { - accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined); + accumulator = isFunction(Ctor) ? baseCreate(getPrototypeOf(object)) : {}; } } else { accumulator = {}; diff --git a/lodash.transform/package.json b/lodash.transform/package.json index fa63b0eac..2302c6326 100644 --- a/lodash.transform/package.json +++ b/lodash.transform/package.json @@ -1,6 +1,6 @@ { "name": "lodash.transform", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.transform` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.unary/README.md b/lodash.unary/README.md index b7ab15656..6ea740444 100644 --- a/lodash.unary/README.md +++ b/lodash.unary/README.md @@ -1,4 +1,4 @@ -# lodash.unary v4.2.0 +# lodash.unary v4.2.1 The [lodash](https://lodash.com/) method `_.unary` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var unary = require('lodash.unary'); ``` -See the [documentation](https://lodash.com/docs#unary) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.unary) for more details. +See the [documentation](https://lodash.com/docs#unary) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.unary) for more details. diff --git a/lodash.unary/index.js b/lodash.unary/index.js index 6373608bc..060917047 100644 --- a/lodash.unary/index.js +++ b/lodash.unary/index.js @@ -51,7 +51,7 @@ var funcTag = '[object Function]', /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; @@ -136,7 +136,7 @@ function arrayEach(array, iteratee) { * specifying an index to search from. * * @private - * @param {Array} [array] The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ @@ -150,7 +150,7 @@ function arrayIncludes(array, value) { * support for iteratee shorthands. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. @@ -172,7 +172,7 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) { * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -280,7 +280,8 @@ function replaceHolders(array, placeholder) { } /** Used for built-in method references. */ -var objectProto = Object.prototype; +var funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; @@ -292,14 +293,14 @@ var maskSrcKey = (function() { }()); /** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; +var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -476,7 +477,7 @@ function createBind(func, bitmask, thisArg) { function createCtor(Ctor) { 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 + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -974,15 +975,14 @@ function unary(func) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -1099,7 +1099,7 @@ function toFinite(value) { * Converts `value` to an integer. * * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -1159,7 +1159,7 @@ function toNumber(value) { return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { diff --git a/lodash.unary/package.json b/lodash.unary/package.json index 13d2b0771..467d03c5f 100644 --- a/lodash.unary/package.json +++ b/lodash.unary/package.json @@ -1,6 +1,6 @@ { "name": "lodash.unary", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.unary` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.union/README.md b/lodash.union/README.md index e23dd0771..51b5100b9 100644 --- a/lodash.union/README.md +++ b/lodash.union/README.md @@ -1,4 +1,4 @@ -# lodash.union v4.2.0 +# lodash.union v4.2.1 The [lodash](https://lodash.com/) method `_.union` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var union = require('lodash.union'); ``` -See the [documentation](https://lodash.com/docs#union) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.union) for more details. +See the [documentation](https://lodash.com/docs#union) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.union) for more details. diff --git a/lodash.union/index.js b/lodash.union/index.js index 36cc1e6bc..4686fdae8 100644 --- a/lodash.union/index.js +++ b/lodash.union/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -17,6 +17,7 @@ var baseFlatten = require('lodash._baseflatten'), * * @static * @memberOf _ + * @since 0.1.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @returns {Array} Returns the new array of combined values. diff --git a/lodash.union/package.json b/lodash.union/package.json index 49125b33d..7798f534f 100644 --- a/lodash.union/package.json +++ b/lodash.union/package.json @@ -1,6 +1,6 @@ { "name": "lodash.union", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.union` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,14 +9,14 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseflatten": "^4.0.0", - "lodash._baseuniq": "^4.0.0", + "lodash._baseflatten": "~4.1.0", + "lodash._baseuniq": "~4.5.0", "lodash.rest": "^4.0.0" } } diff --git a/lodash.unionby/README.md b/lodash.unionby/README.md index ce2a55f81..71963c573 100644 --- a/lodash.unionby/README.md +++ b/lodash.unionby/README.md @@ -1,4 +1,4 @@ -# lodash.unionby v4.2.0 +# lodash.unionby v4.2.1 The [lodash](https://lodash.com/) method `_.unionBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var unionBy = require('lodash.unionby'); ``` -See the [documentation](https://lodash.com/docs#unionBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.unionby) for more details. +See the [documentation](https://lodash.com/docs#unionBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.unionby) for more details. diff --git a/lodash.unionby/index.js b/lodash.unionby/index.js index 3d3144a6b..8d092d54e 100644 --- a/lodash.unionby/index.js +++ b/lodash.unionby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -123,8 +123,7 @@ var unionBy = rest(function(arrays) { * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -172,8 +171,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.unionby/package.json b/lodash.unionby/package.json index f902e1252..1a35d9613 100644 --- a/lodash.unionby/package.json +++ b/lodash.unionby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.unionby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.unionBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.unionwith/README.md b/lodash.unionwith/README.md index 993bcc62e..34c0c365d 100644 --- a/lodash.unionwith/README.md +++ b/lodash.unionwith/README.md @@ -1,4 +1,4 @@ -# lodash.unionwith v4.2.0 +# lodash.unionwith v4.2.1 The [lodash](https://lodash.com/) method `_.unionWith` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var unionWith = require('lodash.unionwith'); ``` -See the [documentation](https://lodash.com/docs#unionWith) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.unionwith) for more details. +See the [documentation](https://lodash.com/docs#unionWith) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.unionwith) for more details. diff --git a/lodash.unionwith/index.js b/lodash.unionwith/index.js index 99b6de693..bb864f4e6 100644 --- a/lodash.unionwith/index.js +++ b/lodash.unionwith/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -121,8 +121,7 @@ var unionWith = rest(function(arrays) { * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -170,8 +169,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.unionwith/package.json b/lodash.unionwith/package.json index 5c64301c8..b77ce66df 100644 --- a/lodash.unionwith/package.json +++ b/lodash.unionwith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.unionwith", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.unionWith` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.uniq/README.md b/lodash.uniq/README.md index 3204e5847..31e7c591e 100644 --- a/lodash.uniq/README.md +++ b/lodash.uniq/README.md @@ -1,4 +1,4 @@ -# lodash.uniq v4.2.0 +# lodash.uniq v4.2.1 The [lodash](https://lodash.com/) method `_.uniq` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var uniq = require('lodash.uniq'); ``` -See the [documentation](https://lodash.com/docs#uniq) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.uniq) for more details. +See the [documentation](https://lodash.com/docs#uniq) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.uniq) for more details. diff --git a/lodash.uniq/index.js b/lodash.uniq/index.js index 6c7bde110..469d0330c 100644 --- a/lodash.uniq/index.js +++ b/lodash.uniq/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -11,11 +11,12 @@ var baseUniq = require('lodash._baseuniq'); /** * Creates a duplicate-free version of an array, using * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each element - * is kept. + * for equality comparisons, in which only the first occurrence of each + * element is kept. * * @static * @memberOf _ + * @since 0.1.0 * @category Array * @param {Array} array The array to inspect. * @returns {Array} Returns the new duplicate free array. diff --git a/lodash.uniq/package.json b/lodash.uniq/package.json index e65a37846..a43d6f3c7 100644 --- a/lodash.uniq/package.json +++ b/lodash.uniq/package.json @@ -1,6 +1,6 @@ { "name": "lodash.uniq", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.uniq` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,12 +9,12 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseuniq": "^4.0.0" + "lodash._baseuniq": "~4.5.0" } } diff --git a/lodash.uniqby/README.md b/lodash.uniqby/README.md index 1524b892d..81009bd8d 100644 --- a/lodash.uniqby/README.md +++ b/lodash.uniqby/README.md @@ -1,4 +1,4 @@ -# lodash.uniqby v4.2.0 +# lodash.uniqby v4.2.1 The [lodash](https://lodash.com/) method `_.uniqBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var uniqBy = require('lodash.uniqby'); ``` -See the [documentation](https://lodash.com/docs#uniqBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.uniqby) for more details. +See the [documentation](https://lodash.com/docs#uniqBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.uniqby) for more details. diff --git a/lodash.uniqby/index.js b/lodash.uniqby/index.js index 678a2e4a1..78a1c4d7d 100644 --- a/lodash.uniqby/index.js +++ b/lodash.uniqby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 diff --git a/lodash.uniqby/package.json b/lodash.uniqby/package.json index da91130a5..c741bd0db 100644 --- a/lodash.uniqby/package.json +++ b/lodash.uniqby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.uniqby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.uniqBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,13 +9,13 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseiteratee": "^4.0.0", - "lodash._baseuniq": "^4.0.0" + "lodash._baseiteratee": "~4.5.0", + "lodash._baseuniq": "~4.5.0" } } diff --git a/lodash.uniqwith/README.md b/lodash.uniqwith/README.md index 501776ad9..4844245ae 100644 --- a/lodash.uniqwith/README.md +++ b/lodash.uniqwith/README.md @@ -1,4 +1,4 @@ -# lodash.uniqwith v4.2.0 +# lodash.uniqwith v4.2.1 The [lodash](https://lodash.com/) method `_.uniqWith` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var uniqWith = require('lodash.uniqwith'); ``` -See the [documentation](https://lodash.com/docs#uniqWith) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.uniqwith) for more details. +See the [documentation](https://lodash.com/docs#uniqWith) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.uniqwith) for more details. diff --git a/lodash.uniqwith/index.js b/lodash.uniqwith/index.js index 0b066c010..d947e83ed 100644 --- a/lodash.uniqwith/index.js +++ b/lodash.uniqwith/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -15,6 +15,7 @@ var baseUniq = require('lodash._baseuniq'); * * @static * @memberOf _ + * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [comparator] The comparator invoked per element. diff --git a/lodash.uniqwith/package.json b/lodash.uniqwith/package.json index 375ec5f89..84867f4a6 100644 --- a/lodash.uniqwith/package.json +++ b/lodash.uniqwith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.uniqwith", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.uniqWith` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,12 +9,12 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, "dependencies": { - "lodash._baseuniq": "^4.0.0" + "lodash._baseuniq": "~4.5.0" } } diff --git a/lodash.unset/README.md b/lodash.unset/README.md index 51c31aaae..48e75ccc2 100644 --- a/lodash.unset/README.md +++ b/lodash.unset/README.md @@ -1,4 +1,4 @@ -# lodash.unset v4.2.0 +# lodash.unset v4.2.1 The [lodash](https://lodash.com/) method `_.unset` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var unset = require('lodash.unset'); ``` -See the [documentation](https://lodash.com/docs#unset) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.unset) for more details. +See the [documentation](https://lodash.com/docs#unset) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.unset) for more details. diff --git a/lodash.unset/index.js b/lodash.unset/index.js index e1d007285..2cfb29a4e 100644 --- a/lodash.unset/index.js +++ b/lodash.unset/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -309,8 +309,7 @@ var isArray = Array.isArray; * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -358,8 +357,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.unset/package.json b/lodash.unset/package.json index 03dc877aa..e4e26e09a 100644 --- a/lodash.unset/package.json +++ b/lodash.unset/package.json @@ -1,6 +1,6 @@ { "name": "lodash.unset", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.unset` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.xor/README.md b/lodash.xor/README.md index dba978c7f..7081ed46e 100644 --- a/lodash.xor/README.md +++ b/lodash.xor/README.md @@ -1,4 +1,4 @@ -# lodash.xor v4.2.0 +# lodash.xor v4.2.1 The [lodash](https://lodash.com/) method `_.xor` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var xor = require('lodash.xor'); ``` -See the [documentation](https://lodash.com/docs#xor) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.xor) for more details. +See the [documentation](https://lodash.com/docs#xor) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.xor) for more details. diff --git a/lodash.xor/index.js b/lodash.xor/index.js index f55128f37..2713587ae 100644 --- a/lodash.xor/index.js +++ b/lodash.xor/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -28,13 +28,13 @@ var funcTag = '[object Function]', function arrayFilter(array, predicate) { var index = -1, length = array.length, - resIndex = -1, + resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { - result[++resIndex] = value; + result[resIndex++] = value; } } return result; @@ -76,7 +76,8 @@ var getLength = baseProperty('length'); /** * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) - * of the given arrays. + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. * * @static * @memberOf _ @@ -117,8 +118,7 @@ var xor = rest(function(arrays) { * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -166,8 +166,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.xor/package.json b/lodash.xor/package.json index 0669fb988..49e4ae710 100644 --- a/lodash.xor/package.json +++ b/lodash.xor/package.json @@ -1,6 +1,6 @@ { "name": "lodash.xor", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.xor` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.xorby/README.md b/lodash.xorby/README.md index e73fda758..e744498d7 100644 --- a/lodash.xorby/README.md +++ b/lodash.xorby/README.md @@ -1,4 +1,4 @@ -# lodash.xorby v4.2.0 +# lodash.xorby v4.2.1 The [lodash](https://lodash.com/) method `_.xorBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var xorBy = require('lodash.xorby'); ``` -See the [documentation](https://lodash.com/docs#xorBy) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.xorby) for more details. +See the [documentation](https://lodash.com/docs#xorBy) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.xorby) for more details. diff --git a/lodash.xorby/index.js b/lodash.xorby/index.js index b0b98868e..ac034c801 100644 --- a/lodash.xorby/index.js +++ b/lodash.xorby/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -29,13 +29,13 @@ var funcTag = '[object Function]', function arrayFilter(array, predicate) { var index = -1, length = array.length, - resIndex = -1, + resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { - result[++resIndex] = value; + result[resIndex++] = value; } } return result; @@ -96,7 +96,7 @@ function last(array) { /** * This method is like `_.xor` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). + * by which they're compared. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ @@ -146,8 +146,7 @@ var xorBy = rest(function(arrays) { * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -195,8 +194,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.xorby/package.json b/lodash.xorby/package.json index 5bc5aa3b7..3326b7fb7 100644 --- a/lodash.xorby/package.json +++ b/lodash.xorby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.xorby", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.xorBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash", diff --git a/lodash.xorwith/README.md b/lodash.xorwith/README.md index 181ac078f..981c7ed75 100644 --- a/lodash.xorwith/README.md +++ b/lodash.xorwith/README.md @@ -1,4 +1,4 @@ -# lodash.xorwith v4.2.0 +# lodash.xorwith v4.2.1 The [lodash](https://lodash.com/) method `_.xorWith` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var xorWith = require('lodash.xorwith'); ``` -See the [documentation](https://lodash.com/docs#xorWith) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.xorwith) for more details. +See the [documentation](https://lodash.com/docs#xorWith) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.xorwith) for more details. diff --git a/lodash.xorwith/index.js b/lodash.xorwith/index.js index a894378aa..9b2e22759 100644 --- a/lodash.xorwith/index.js +++ b/lodash.xorwith/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -28,13 +28,13 @@ var funcTag = '[object Function]', function arrayFilter(array, predicate) { var index = -1, length = array.length, - resIndex = -1, + resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { - result[++resIndex] = value; + result[resIndex++] = value; } } return result; @@ -144,8 +144,7 @@ var xorWith = rest(function(arrays) { * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -193,8 +192,8 @@ function isArrayLikeObject(value) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/lodash.xorwith/package.json b/lodash.xorwith/package.json index fdf574363..e01cd8e64 100644 --- a/lodash.xorwith/package.json +++ b/lodash.xorwith/package.json @@ -1,6 +1,6 @@ { "name": "lodash.xorwith", - "version": "4.2.0", + "version": "4.2.1", "description": "The lodash method `_.xorWith` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -9,7 +9,7 @@ "author": "John-David Dalton (http://allyoucanleet.com/)", "contributors": [ "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", + "Blaine Bublitz (https://github.com/phated)", "Mathias Bynens (https://mathiasbynens.be/)" ], "repository": "lodash/lodash",