sample-size
🎲 pass/fail by sample size
Accepts one decimal fraction
const sample = ; // always false // always true // about 20% true
Usage examples
Report only about 5% of events
&& ;
Sample about half of a list
array;
Transpiled version
Environments which exclude node_modules from the transpiling pipeline should include the "browser" entry instead of "main". This exposes an ES5 commonjs module.
Also available for explicit import:
const sample = ;