UNPKG

262 BJavaScriptView Raw
1module.exports = function(from, to, step) {
2 if (to === undefined) {
3 to = from;
4 from = 0;
5 }
6
7 if (step === undefined) {
8 step = 1;
9 }
10
11 var results = [];
12
13 for (var n = from; n != to; n += step) {
14 results.push(n);
15 }
16
17 return results;
18};