diff --git a/README.md b/README.md
index f16eb0380..a8ab08d6c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# lodash v3.3.4
+# lodash v3.3.5
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
diff --git a/lodash.fill/README.md b/lodash.fill/README.md
index fa8ddcc28..8ceae630c 100644
--- a/lodash.fill/README.md
+++ b/lodash.fill/README.md
@@ -1,4 +1,4 @@
-# lodash.fill v3.3.4
+# lodash.fill v3.3.5
The [lodash](https://lodash.com/) method `_.fill` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var fill = require('lodash.fill');
```
-See the [documentation](https://lodash.com/docs#fill) or [package source](https://github.com/lodash/lodash/blob/3.3.4-npm-packages/lodash.fill) for more details.
+See the [documentation](https://lodash.com/docs#fill) or [package source](https://github.com/lodash/lodash/blob/3.3.5-npm-packages/lodash.fill) for more details.
diff --git a/lodash.fill/index.js b/lodash.fill/index.js
index c45ff8b87..027da743d 100644
--- a/lodash.fill/index.js
+++ b/lodash.fill/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 3.3.4 (Custom Build)
+ * lodash 3.3.5 (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
@@ -39,20 +39,6 @@ var reIsUint = /^(?:0|[1-9]\d*)$/;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
-/**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
-function isIndex(value, length) {
- value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return value > -1 && value % 1 == 0 && value < length;
-}
-
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -138,6 +124,21 @@ function baseProperty(key) {
*/
var getLength = baseProperty('length');
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+}
+
/**
* Checks if the given arguments are from an iteratee call.
*
diff --git a/lodash.fill/package.json b/lodash.fill/package.json
index b1d71f72f..d61315f24 100644
--- a/lodash.fill/package.json
+++ b/lodash.fill/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.fill",
- "version": "3.3.4",
+ "version": "3.3.5",
"description": "The lodash method `_.fill` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
diff --git a/lodash.inrange/README.md b/lodash.inrange/README.md
index 684f1c795..ffc7d1eb7 100644
--- a/lodash.inrange/README.md
+++ b/lodash.inrange/README.md
@@ -1,4 +1,4 @@
-# lodash.inrange v3.3.4
+# lodash.inrange v3.3.5
The [lodash](https://lodash.com/) method `_.inRange` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var inRange = require('lodash.inrange');
```
-See the [documentation](https://lodash.com/docs#inRange) or [package source](https://github.com/lodash/lodash/blob/3.3.4-npm-packages/lodash.inrange) for more details.
+See the [documentation](https://lodash.com/docs#inRange) or [package source](https://github.com/lodash/lodash/blob/3.3.5-npm-packages/lodash.inrange) for more details.
diff --git a/lodash.inrange/index.js b/lodash.inrange/index.js
index 655ec585c..3990fbc9f 100644
--- a/lodash.inrange/index.js
+++ b/lodash.inrange/index.js
@@ -8,7 +8,9 @@
*/
/** Used as references for various `Number` constants. */
-var NAN = 0 / 0;
+var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
/** `Object#toString` result references. */
var funcTag = '[object Function]',
@@ -162,6 +164,41 @@ function isSymbol(value) {
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
/**
* Converts `value` to a number.
*
@@ -245,12 +282,12 @@ function toNumber(value) {
* // => true
*/
function inRange(number, start, end) {
- start = toNumber(start) || 0;
+ start = toFinite(start);
if (end === undefined) {
end = start;
start = 0;
} else {
- end = toNumber(end) || 0;
+ end = toFinite(end);
}
number = toNumber(number);
return baseInRange(number, start, end);
diff --git a/lodash.inrange/package.json b/lodash.inrange/package.json
index f4fa83fcb..da310a4cf 100644
--- a/lodash.inrange/package.json
+++ b/lodash.inrange/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.inrange",
- "version": "3.3.4",
+ "version": "3.3.5",
"description": "The lodash method `_.inRange` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",