rollout
rollout(
key,percent,salt?):boolean
Defined in: src/hash.ts:95
Whether key falls inside a percent rollout, where percent is a fraction
in [0, 1]. Growing the percentage only ever adds keys, never moves one out.
Parameters
Section titled “Parameters”percent
Section titled “percent”number
Returns
Section titled “Returns”boolean
Example
Section titled “Example”rollout("user-42", 0.1); // false, not in the first 10%rollout("user-42", 0.5); // true, and it stays true as the rollout widens