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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
required fields:
type: Valid options are: percentage, list, switch, 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.
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