Optional
options: { from?: number; withFactor?: number }Optional
from?: numberInitial delay duration in milliseconds. Default is 1
.
Optional
withFactor?: numberExponentiation factor. Default is 2
.
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 exponentially until reachingNumber.MAX_SAFE_INTEGER
, after which the generator will continue yieldingNumber.MAX_SAFE_INTEGER
forever.By default, this increases exponentially by a factor of 2; you may optionally pass
{ factor: someOtherValue }
to change the exponentiation factor.If you pass a non-integral value as
base
, it will be rounded to the nearest integral value usingMath.round
.