racker/signal

Name: signal

Owner: racker

Description: signal feature flag library

Created: 2017-12-05 19:27:26.0

Updated: 2017-12-05 19:28:14.0

Pushed: 2017-12-05 19:28:13.0

Homepage: null

Size: 26

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Signal, a feature flag library

How it works:

Signal is configured with 2 required options and 1 optional option. The required options are user and flags. A user object represents the object that will be used to determine certain fields that are used.

Flag data shape:

required fields:

type: Valid options are: percentage, list, switch, all, any

percentage
list
switch
a simple boolean flag
all
any

key: key used in lookup object

data: data used by each flag type. percentage is the percent value. for list it's a list of values. For switch it's true or false. For all and any it's a list of other flag names

active: true or false, determines if the flag is stored in the lookup object

property: the identifier used to lookup data from the user object. Varies in usage between flags.

Example Usage
t aws = require('aws-sdk');
t db = new AWS.DynamoDB.DocumentClient();
t params = {
bleName : 'Table',
lterExpression : 'active = :active',
pressionAttributeValues : {':active' : true}


can(params).promise()
hen(response => response.Items)
hen(flags => {
return signal.config({user, flags})
;



signal.isEnabled('waypoint')) {
 show waypoint stuff


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.