Add randIncermentalNumber function
shaharkazaz opened this issue · 0 comments
shaharkazaz commented
Description
A common use case in applications is showing an incremental number. We proposed the following API:
General API
const numberFactory: () => number | undefined = randIncermentalNumber({ from, to?, step: number })
Example
const numberFactory = randIncermentalNumber({
from: 100,
to: 200,
step: 10
});
numberFactory() // 100
numberFactory() // 110
numberFactory() // 120
...
numberFactory() // 200
numberFactory() // undefined
Proposed solution
No response
Alternatives considered
No response
Do you want to create a pull request?
No