darklaunch-js

0.7.7 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i darklaunch-js

Weekly Downloads

2

Version

0.7.7

License

none

Unpacked Size

4.95 kB

Total Files

3

Last publish

Collaborators

  • jakecooper