diff --git a/README.md b/README.md index 1c8619896..ec24ba949 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash-es v3.9.2 +# lodash-es v3.9.3 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [ES](https://people.mozilla.org/~jorendorff/es6-draft.html) modules. @@ -7,4 +7,4 @@ Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): $ lodash modularize modern exports=es -o ./ ``` -See the [package source](https://github.com/lodash/lodash/tree/3.9.2-es) for more details. +See the [package source](https://github.com/lodash/lodash/tree/3.9.3-es) for more details. diff --git a/internal/isIndex.js b/internal/isIndex.js index 73e34d32c..cff7909e1 100644 --- a/internal/isIndex.js +++ b/internal/isIndex.js @@ -1,3 +1,6 @@ +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + /** * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) * of an array-like value. @@ -13,7 +16,7 @@ var MAX_SAFE_INTEGER = 9007199254740991; * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { - value = typeof value == 'number' ? value : parseFloat(value); + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; length = length == null ? MAX_SAFE_INTEGER : length; return value > -1 && value % 1 == 0 && value < length; } diff --git a/lodash.js b/lodash.js index 215c3988a..ed20942d3 100644 --- a/lodash.js +++ b/lodash.js @@ -1,6 +1,6 @@ /** * @license - * lodash 3.9.2 (Custom Build) + * lodash 3.9.3 (Custom Build) * Build: `lodash modularize modern exports="es" -o ./` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -42,7 +42,7 @@ import support from './support'; import thru from './chain/thru'; /** Used as the semantic version number. */ -var VERSION = '3.9.2'; +var VERSION = '3.9.3'; /** Used to compose bitmasks for wrapper metadata. */ var BIND_KEY_FLAG = 2; diff --git a/package.json b/package.json index 49ed990eb..c8b0fa245 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash-es", - "version": "3.9.2", + "version": "3.9.3", "description": "The modern build of lodash exported as ES modules.", "homepage": "https://lodash.com/custom-builds", "license": "MIT",