From f45fc10cb1ae2959b42bff1b9e97e033432d193a Mon Sep 17 00:00:00 2001 From: Xotic750 Date: Tue, 3 Nov 2015 11:35:33 +0100 Subject: [PATCH] Enhance `range` with `toNumber` to allow binary and octal strings. --- lodash.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lodash.js b/lodash.js index 6407bb769..52cb7d21b 100644 --- a/lodash.js +++ b/lodash.js @@ -12976,15 +12976,15 @@ if (step && isIterateeCall(start, end, step)) { end = step = undefined; } - start = +start; + start = toNumber(start); start = start === start ? start : 0; - step = step === undefined ? 1 : (+step || 0); + step = step === undefined ? 1 : (toNumber(step) || 0); if (end === undefined) { end = start; start = 0; } else { - end = +end || 0; + end = toNumber(end) || 0; } var n = nativeMax(nativeCeil((end - start) / (step || 1)), 0); return baseTimes(n, function(index) {