refactor: add maxDelay param to calculateDelay and export MAX_TIMEOUT_DELAY
Export MAX_TIMEOUT_DELAY as a named constant (2^31 - 1) so callers can reference the same ceiling used internally. Add an optional `maxDelay` param to `calculateDelay` so callers can cap the backoff independently of the hard setTimeout ceiling. Add unit tests covering exponential growth, the custom cap, and the absolute ceiling.
O
Olivier Louvignes committed
f2d142aa4ff5f94cf15d514978bfc47838eda782
Parent: cbffdaa