UNPKG

@nimpl/ab-tests

Version:

A package for conducting A/B tests on a website using middleware

21 lines (20 loc) 433 B
export type RuleType = "header" | "cookie" | "host" | "query"; export type Rule = { type: RuleType; key: string; value?: string; ignoreOnNextRequests?: boolean; }; export type Variant = { weight: number; destination: string; type?: "rewrite" | "redirect"; status?: number; }; export type Test = { id: string; source: string; has?: Rule[]; missing?: Rule[]; variants: Variant[]; };