UNPKG

@croct/rule-engine-experiments

Version:

A rule engine extension for A/B and multivariate testing.

9 lines (8 loc) 404 B
import engine from '@croct/plug-rule-engine/plugin'; import ExperimentsExtension from './extension'; import { definitionsSchema } from './schemas'; engine.extend('experiments', function (_a) { var options = _a.options, sdk = _a.sdk; definitionsSchema.validate(options); return new ExperimentsExtension(options, sdk.tracker, sdk.getBrowserStorage(), sdk.getTabStorage(), sdk.getLogger()); });