Socket
Socket
Sign inDemoInstall

fflip

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fflip - npm Package Compare versions

Comparing version 2.0.0-alpha to 2.0.0

14

lib/fflip.js

@@ -90,3 +90,3 @@ /**

if(getFeatures) {
reloadInverval = setInterval(self.reload, self._reloadRate);
reloadInverval = setInterval(self.reload, self._reloadRate);
}

@@ -131,3 +131,3 @@ }

/**
* Check if a user has some given feature, and returns a boolean.
* Check if a user has some given feature, and returns a boolean.
* Returns null if the feature does not exist.

@@ -162,3 +162,3 @@ * @param {Object} user The User object that criterial will check against.

* @param {Object} user The User object that criterial will check against.
* @param {Object} flags A collection of overrides
* @param {Object} flags A collection of overrides
* [@deprecated this flag will be removed soon]

@@ -251,3 +251,3 @@ * @return {Object} The collection of all features and their availability.

// remove
case '1':
case '-1':
delete flags[name];

@@ -281,7 +281,7 @@ actionName = 'removed';

// Express Middleware
app.use(_express_middleware);
app.use(this._express_middleware);
// Manual Flipping Route
app.get('/fflip/:name/:action', _express_route);
app.get('/fflip/:name/:action', this._express_route);
},
};
};

@@ -6,3 +6,3 @@ {

"licence": "MIT",
"version": "2.0.0-alpha",
"version": "2.0.0",
"main": "lib/fflip",

@@ -9,0 +9,0 @@ "repository": "FredKSchott/fflip",

@@ -44,3 +44,3 @@ 'use strict';

},
fClosed: {
fClosed: {
criteria: {

@@ -207,2 +207,6 @@ c1: false

};
this.appMock = {
use: sandbox.spy(),
get: sandbox.spy()
};
});

@@ -289,2 +293,12 @@

it('should mount express middleware into provided app', function() {
fflip.express(this.appMock);
assert.ok(this.appMock.use.calledWith(fflip._express_middleware));
});
it('should add GET route for manual feature flipping into provided app', function() {
fflip.express(this.appMock);
assert.ok(this.appMock.get.calledWith('/fflip/:name/:action', fflip._express_route));
});
});

@@ -347,3 +361,3 @@

// });
// it('should return a 400 error if action is invalid', function() {

@@ -355,3 +369,3 @@ // request.get('/fflip/fOpen/5').expect(400, function(err){

// });
// it('should return a 200 sucess if request was valid', function() {

@@ -358,0 +372,0 @@ // request.get('/fflip/fOpen/1').expect(400, function(err){

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