Function
Static Public Summary | ||
public |
* backwardRangeIterator(start: number, stop: number, step: number): IterableIterator<number> Yields values in a range, separated by a fixed negative constant called step. |
|
public |
* forwardRangeIterator(start: number, stop: number, step: number): IterableIterator<number> Yields values in a range, separated by a fixed positive constant called step. |
|
public |
range(start: number, stop: number, step: number): ForwardRange | BackwardRange Constructs a Range whose iterator yields values in an interval, separated by a fixed constant called step. |
|
public |
Resolve arguments for range and rangeIterator. |
|
public |
rangeIterator(start: number, stop: number, step: number): IterableIterator<number> Yields values in a range, separated by a fixed constant called step. |
Static Public
public * backwardRangeIterator(start: number, stop: number, step: number): IterableIterator<number> source
import backwardRangeIterator from '@iterable-iterator/range/src/backwardRangeIterator.js'
Yields values in a range, separated by a fixed negative constant called step. The range has to be given in reverse order, that is, largest value first, smallest value second. This is an iterator that preserves state accross calls.
public * forwardRangeIterator(start: number, stop: number, step: number): IterableIterator<number> source
import forwardRangeIterator from '@iterable-iterator/range/src/forwardRangeIterator.js'
Yields values in a range, separated by a fixed positive constant called step. This is an iterator that preserves state accross calls.
public range(start: number, stop: number, step: number): ForwardRange | BackwardRange source
import range from '@iterable-iterator/range/src/range.js'
Constructs a Range whose iterator yields values in an interval,
separated by a fixed constant called step. If this step is negative, the
range has to be given in reverse order, that is, largest value first,
smallest value second. Both the starting value and the step value are
optional. By default the starting value is 0
. The default for
the step value is 1
.
public rangeArgs(start: number, stop: number, step: number): [number, number, number] source
import rangeArgs from '@iterable-iterator/range/src/rangeArgs.js'
Resolve arguments for range and rangeIterator.
Return:
[number, number, number] |
public rangeIterator(start: number, stop: number, step: number): IterableIterator<number> source
import rangeIterator from '@iterable-iterator/range/src/rangeIterator.js'
Yields values in a range, separated by a fixed constant called step. If this
step is negative, the range has to be given in reverse order, that is,
largest value first, smallest value second. Both the starting value and the
step value are optional. By default the starting value is 0
.
The default for the step value is 1
.