Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fco/aybee-client
Client for aybee Tests
https://github.com/fco/aybee-client
abtest abtest-framework abtesting
Last synced: about 1 month ago
JSON representation
Client for aybee Tests
- Host: GitHub
- URL: https://github.com/fco/aybee-client
- Owner: FCO
- Created: 2018-07-07T04:30:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-13T21:50:53.000Z (about 2 years ago)
- Last Synced: 2024-10-28T00:19:10.829Z (3 months ago)
- Topics: abtest, abtest-framework, abtesting
- Language: JavaScript
- Homepage:
- Size: 379 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aybee-client
## Synopsis
`aybee-client` is a client library to [`aybee` tests system](http://github.com/FCO/aybee).
## Example
```javascript
const AyBee = require("aybee")
const ayBee = await AyBee.config("b12458b6-815a-11e8-ba08-83307a5aa975")ayBee.ids.accountId = 123 // warns if accountId is not registred
ayBee.ids.requestId = 456 // warns if requestId is not registredconsole.log(Object.keys(ayBee.experiments)) // get all participants experiment names
if("exp 001" in ayBee.experiments) { // if it's participating of experiment exp 001
console.log(`Exp: exp 001`)
console.log(
`Variant ${ayBee.experiments["exp 001"]}` // get the variant
)
}const {
bla,
ble,
bli = 42,
blo = 13,
blu: anotherVar = 3.14
} = ayBee.vars // get variables defined by variants
console.log({bla, ble, bli, blo, anotherVar})ayBee.metrics.productVisualized({product: 789}) // send metrics
```