@zephr/sdk
v1.1.0
Published
Zephr Decision SDK
Downloads
44
Readme
Zephr Decision SDK
Overview
Providing access to the Zephr Decision Engine using Feature SDK rules.
Getting the SDK
This SDK is available as an NPM module.
npm install @zephr/sdkUsage
The SDK needs your Zephr Site Domain to operate
const Zephr = require('@zephr/sdk').build('my-zephr-site-domain');
var inputs = getInputs(); // you need to implement this
var response = await Zephr.decision(inputs);Response in this instance will return a Json object detailing the sdkFeatureSlug, outputType and outputValue. To retrieve just the outputValue an optional boolean can be added to the decision function.
var response = await Zephr.decision(inputs, true); // will return only outputValue