This is the javascript client for the scrutinize experimentation platform.
To install the client, use npm:
npm i scrutinize-client
Once installed, you can publish metrics and conduct experiments using the client API.
Publishing Metrics
import ScrutinizeClient from 'scrutinize';
const scrutinize = ScrutinizeClient('https://scrutinize-location');
await scrutinize.observe(
'wilma_rudolph',
'purchased_coffee',
True,
)
Running an experiment
import ScrutinizeClient from 'scrutinize';
import canUserHaveFreeCoffee from 'my_helper_lib';
const scrutinize = ScrutinizeClient('https://scrutinize-location');
const [isExperiment, gaveFreeCoffee] = await scrutinize.call(
'eng.give_user_free_coffee',
'wilma_rudolph',
False,
lambda: canUserHaveFreeCoffee('wilma_rudolph'),
)