darklaunch-js
v0.7.7
Published
Darklaunch bindings for JavaScript
Downloads
31
Readme
Darklaunch-js
Darklaunch is a zero configuration live deployment/rollback platform. Write code using feature flags and test it in production. No builds, no bullshit, just code.
Installation
Through npm:
npm install darklaunch-js --save
Through yarn:
yarn add darklaunch-js
Configuration
Darklaunch requires a darklaunch.config.json file to function.
{
"token": "ijk6t78asdf"
}
Usage
import Darklaunch from 'darklaunch-js'
...
Darklaunch.setUser(uniqueID) # Optional: You may bind the darklaunch storage to uniquely identify a user. Otherwise, one will be generated and cached.
...
if (Darklaunch.isEnabled('DEV-123') {
#Darklaunch Enabled
} else {
#Darklaunch Disabled
}
Darklaunch.isEnabled will automatically determine a users eligibility for a darklaunch given the response from your endpoint.
Development
Darklaunch is built using Parcel. Simply import it into any project, make your changes, and then push to a branch. A sample "Clone and Go" application is located here.
Contribution
Open a PR. The more the merrier.
Liscense
MIT