Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

suite-flipper-js

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

suite-flipper-js - npm Package Compare versions

Comparing version 1.0.2 to 1.0.4

.idea/.name

14

package.json
{
"name": "suite-flipper-js",
"version": "1.0.2",
"version": "1.0.4",
"description": "Flipper Class",
"main": "lib/index.js",
"main": "dist/index.js",
"scripts": {
"test": "mocha test"
"test": "mocha test",
"build": "rm -rf dist/* && babel lib --ignore __tests__ --out-dir dist",
"prepublish": "npm test && npm run build"
},
"browserify": {
"transform": [
"babelify"
]
},
"repository": {

@@ -24,2 +21,3 @@ "type": "git",

"devDependencies": {
"babel": "^5.8.23",
"chai": "^3.2.0",

@@ -26,0 +24,0 @@ "lodash": "^3.10.1",

@@ -6,30 +6,40 @@ # suite-flipper-js

npm install --save suite-flipper-js
```bash
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 api response
```javascript
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
```javascript
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](https://github.com/emartech/angular-suite-flipper)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc