@lucid-softworks/range
v0.1.0
Published
Create ascending or descending finite number ranges.
Maintainers
Readme
@lucid-softworks/range
Create finite, end-exclusive ascending or descending number ranges.
import { range } from "@lucid-softworks/range";
range(4); // [0, 1, 2, 3]
range(5, 1); // [5, 4, 3, 2]
range(1, 7, 2); // [1, 3, 5]The default step follows the direction of the boundaries. An explicit step
pointing away from the stop produces []. Boundaries and steps must be finite,
and the step cannot be zero.
