UNPKG

tastypie

Version:

Tastypie is a webservice API framework for Node.js based on Django's Tastypie Framework. It provides a convenient, yet powerful and highly customizable, abstraction for creating REST-style interfaces

28 lines (21 loc) 520 B
define(['../math/countSteps'], function (countSteps) { /** * Returns an Array of numbers inside range. */ function range(start, stop, step) { if (stop == null) { stop = start; start = 0; } step = step || 1; var result = [], nSteps = countSteps(stop - start, step), i = start; while (i <= stop) { result.push(i); i += step; } return result; } return range; });