UNPKG

aureooms-js-array

Version:

array manipulation code bricks for JavaScript

21 lines (13 loc) 244 B
export function range ( start, stop, step, out ) { if ( step < 0 ) { for ( ; start > stop ; start += step ) { out.push( start ); } } else { for ( ; start < stop ; start += step ) { out.push( start ); } } return out; }