pickVariant
function pickVariant(variants, seed): | { id: string; variant: Variant;} | null;Defined in: src/rules.ts:95
Pick a variant deterministically for seed (same seed → same variant).
Returns the variant and its id (explicit id or its index).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
variants |
readonly Variant[] |
seed |
string |
Returns
Section titled “Returns”| {
id: string;
variant: Variant;
}
| null