scrutinize-client

client for scrutinize lightweight experimentation platform

Usage no npm install needed!

<script type="module">
  import scrutinizeClient from 'https://cdn.skypack.dev/scrutinize-client';
</script>

README

scrutinize-client

This is the javascript client for the scrutinize experimentation platform.

Installation

To install the client, use npm:

npm i scrutinize-client

Usage

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'),
)