Optional
options: { from?: number; withStepSize?: number }Optional
from?: numberInitial delay duration in milliseconds. Default is 0
.
Optional
withStepSize?: numberStep size by which to increase the value. Default is 1
.
Setting this to a value less than 1
will cause the delay intervals to
decay rather than increase. This is rarely what you want!
Generate an infinite iterable of integers beginning with
base
and increasing linearly (1, 2, 3, 4, 5, 5, 7, ...) until reachingNumber.MAX_SAFE_INTEGER
, after which the generator will continue yieldingNumber.MAX_SAFE_INTEGER
forever.By default, this increases by a step size of 1; you may optionally pass
{ step: someOtherValue }
to change the step size.If you pass a non-integral value as
base
, it will be rounded to the nearest integral value usingMath.round
.