diff --git a/README.md b/README.md index 5bff76816..5e1226543 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v3.7.1 +# lodash v3.7.2 The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method. diff --git a/lodash._baseget/README.md b/lodash._baseget/README.md index aca84a1f1..00703880d 100644 --- a/lodash._baseget/README.md +++ b/lodash._baseget/README.md @@ -1,4 +1,4 @@ -# lodash._baseget v3.7.1 +# lodash._baseget v3.7.2 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseGet` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var baseGet = require('lodash._baseget'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.7.1-npm-packages/lodash._baseget) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.7.2-npm-packages/lodash._baseget) for more details. diff --git a/lodash._baseget/index.js b/lodash._baseget/index.js index 83ae92025..42ff908f5 100644 --- a/lodash._baseget/index.js +++ b/lodash._baseget/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.7.1 (Custom Build) + * lodash 3.7.2 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -24,17 +24,17 @@ function baseGet(object, path, pathKey) { if (pathKey !== undefined && pathKey in toObject(object)) { path = [pathKey]; } - var index = -1, + var index = 0, length = path.length; - while (object != null && ++index < length) { - object = object[path[index]]; + while (object != null && index < length) { + object = object[path[index++]]; } return (index && index == length) ? object : undefined; } /** - * Converts `value` to an object if it is not one. + * Converts `value` to an object if it's not one. * * @private * @param {*} value The value to process. @@ -68,7 +68,7 @@ function isObject(value) { // Avoid a V8 JIT bug in Chrome 19-20. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; - return type == 'function' || (!!value && type == 'object'); + return !!value && (type == 'object' || type == 'function'); } module.exports = baseGet; diff --git a/lodash._baseget/package.json b/lodash._baseget/package.json index ed7e7fd2d..e9e4e0f48 100644 --- a/lodash._baseget/package.json +++ b/lodash._baseget/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseget", - "version": "3.7.1", + "version": "3.7.2", "description": "The modern build of lodash’s internal `baseGet` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash._invokepath/README.md b/lodash._invokepath/README.md index a6b8ed2e5..316c4ed4a 100644 --- a/lodash._invokepath/README.md +++ b/lodash._invokepath/README.md @@ -1,4 +1,4 @@ -# lodash._invokepath v3.7.1 +# lodash._invokepath v3.7.2 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `invokePath` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var invokePath = require('lodash._invokepath'); ``` -See the [package source](https://github.com/lodash/lodash/blob/3.7.1-npm-packages/lodash._invokepath) for more details. +See the [package source](https://github.com/lodash/lodash/blob/3.7.2-npm-packages/lodash._invokepath) for more details. diff --git a/lodash._invokepath/index.js b/lodash._invokepath/index.js index a791f0ed7..76a6e4dd0 100644 --- a/lodash._invokepath/index.js +++ b/lodash._invokepath/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.7.1 (Custom Build) + * lodash 3.7.2 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -55,7 +55,7 @@ function isKey(value, object) { } /** - * Converts `value` to an object if it is not one. + * Converts `value` to an object if it's not one. * * @private * @param {*} value The value to process. @@ -107,7 +107,7 @@ function isObject(value) { // Avoid a V8 JIT bug in Chrome 19-20. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; - return type == 'function' || (!!value && type == 'object'); + return !!value && (type == 'object' || type == 'function'); } module.exports = invokePath; diff --git a/lodash._invokepath/package.json b/lodash._invokepath/package.json index fb79a0b97..bb5c85621 100644 --- a/lodash._invokepath/package.json +++ b/lodash._invokepath/package.json @@ -1,6 +1,6 @@ { "name": "lodash._invokepath", - "version": "3.7.1", + "version": "3.7.2", "description": "The modern build of lodash’s internal `invokePath` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.set/README.md b/lodash.set/README.md index f941933a0..aa5b2ce64 100644 --- a/lodash.set/README.md +++ b/lodash.set/README.md @@ -1,4 +1,4 @@ -# lodash.set v3.7.1 +# lodash.set v3.7.2 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.set` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. @@ -17,4 +17,4 @@ In Node.js/io.js: var set = require('lodash.set'); ``` -See the [documentation](https://lodash.com/docs#set) or [package source](https://github.com/lodash/lodash/blob/3.7.1-npm-packages/lodash.set) for more details. +See the [documentation](https://lodash.com/docs#set) or [package source](https://github.com/lodash/lodash/blob/3.7.2-npm-packages/lodash.set) for more details. diff --git a/lodash.set/index.js b/lodash.set/index.js index ceafd115e..67bb60e31 100644 --- a/lodash.set/index.js +++ b/lodash.set/index.js @@ -1,5 +1,5 @@ /** - * lodash 3.7.1 (Custom Build) + * lodash 3.7.2 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -17,7 +17,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) * of an array-like value. */ -var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; +var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like index. @@ -28,7 +28,7 @@ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { - value = +value; + value = typeof value == 'number' ? value : parseFloat(value); length = length == null ? MAX_SAFE_INTEGER : length; return value > -1 && value % 1 == 0 && value < length; } @@ -54,7 +54,7 @@ function isKey(value, object) { } /** - * Converts `value` to an object if it is not one. + * Converts `value` to an object if it's not one. * * @private * @param {*} value The value to process. @@ -88,7 +88,7 @@ function isObject(value) { // Avoid a V8 JIT bug in Chrome 19-20. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. var type = typeof value; - return type == 'function' || (!!value && type == 'object'); + return !!value && (type == 'object' || type == 'function'); } /** diff --git a/lodash.set/package.json b/lodash.set/package.json index ed8bc7251..926a866e3 100644 --- a/lodash.set/package.json +++ b/lodash.set/package.json @@ -1,6 +1,6 @@ { "name": "lodash.set", - "version": "3.7.1", + "version": "3.7.2", "description": "The modern build of lodash’s `_.set` as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg",