suite-flipper-js

2.1.0 • Public • Published

Suite Flipper JS

Install

npm install --save suite-flipper-js

Usage

var flipper = Flipper.create(['bi', 'dummy', 'dummy2']);
 
flipper.isOn('bi'); //true
flipper.isOn('notInTheList'); //false
flipper.isOff('bi'); //false
flipper.isOff('notInTheList'); //true

Usage from service api response

var flipper = Flipper.createForApiResponse([
  { id: 'bi', isOn: true },
  { id: 'dummy', isOn: true },
  { id: 'dummy2', isOn: false }
]);
 
flipper.isOn('bi'); //true
flipper.isOn('dummy2'); //false
flipper.isOn('notInTheList'); //false
flipper.isOff('bi'); //false
flipper.isOff('dummy2'); //true
flipper.isOff('notInTheList'); //true

Usage in Angular Js

There is a wrapper for this class to use with angularJS

Readme

Keywords

none

Package Sidebar

Install

npm i suite-flipper-js

Weekly Downloads

4

Version

2.1.0

License

ISC

Unpacked Size

8.86 kB

Total Files

8

Last publish

Collaborators

  • emarsys-deployer
  • sviktor