just-range
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -12,2 +12,11 @@ module.exports = range; | ||
function range(start, stop, step) { | ||
if (start != null && typeof start != 'number') { | ||
throw new Error('start must be a number or null'); | ||
} | ||
if (stop != null && typeof stop != 'number') { | ||
throw new Error('stop must be a number or null'); | ||
} | ||
if (step != null && typeof step != 'number') { | ||
throw new Error('step must be a number or null'); | ||
} | ||
if (stop == null) { | ||
@@ -14,0 +23,0 @@ stop = start || 0; |
{ | ||
"name": "just-range", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "Generate a range array for numbers", | ||
@@ -10,8 +10,3 @@ "main": "index.js", | ||
"repository": "https://github.com/angus-c/just", | ||
"keywords": [ | ||
"array", | ||
"range", | ||
"no-dependencies", | ||
"just" | ||
], | ||
"keywords": ["array", "range", "no-dependencies", "just"], | ||
"author": "Dawson Botsford", | ||
@@ -18,0 +13,0 @@ "license": "MIT", |
1702
32