2.1.0 • Published 7 years ago

suite-flipper-js v2.1.0

Weekly downloads
79
License
ISC
Repository
github
Last release
7 years ago

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

2.1.0

7 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago