1.3.1 • Published 5 years ago

hindenburg v1.3.1

Weekly downloads
7
License
ISC
Repository
bitbucket
Last release
5 years ago

Hindenburg

This adds structure to a JSON-document based feature flag service. It's intended that the file created by this will live in a CDN with a short cache life & is requested by the frontend.

The CLI manipulates a JSON document on the file system.

Installation

npm install -g hindenburg

Add a config block to your package.json:

{
  ...
  "hindenburg": {
    "path": "feature-flags.json"
  }
  ...
}

If you don't supply this the default is a file in the current directory called feature-flags.json

Flag Management Usage

hb add-flag <flag>
hb remove-flag <flag>
hb set-default <flag> <default>
hb set-user <flag> <user> <'on'|'off'|'default'>
hb set-group <flag> <group> <'on'|'off'|'default'>

Package Usage

Install the module in the application you're going to use it in:

npm install hindenburg

Then construct a FlagObject:

import { initialise } from 'hindenburg

...

const flags = initialise({ ... json from fetching feature-flags.json ... })
const canWeasel = flags.canWeasel('can-weasel', { userId: 'me', group: undefined })

Fetching the json from feature-flags.json is left for the user to implement.

1.3.1

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago