Skip to content

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.

Seed

number

Seed

boolean

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