Tesfy could be installed via npm or yarn. This is the recommended way to get the library.
npm install tesfy --save# oryarn add tesfy
Tesfy dist files are all avaliables from jsDelivr or unpkg.
<script src="https://cdn.jsdelivr.net/npm/tesfy@1.0.0/dist/tesfy.umd.production.min.js"></script><!-- or --><script src="https://unpkg.com/tesfy@1.0.0/dist/tesfy.umd.production.min.js"></script>
Once imported, instantiate the engine with a datafile
and optionally a storage
layer to enable sticky bucketing, a userId
and a set of attributes
.
import * as Tesfy from 'tesfy';const tesfy = new Tesfy.Engine({ datafile, storage, userId, attributes });