mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Enhance range with toNumber to allow binary and octal strings.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user