Socket
Socket
Sign inDemoInstall

suite-flipper-js

Package Overview
Dependencies
Maintainers
2
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.5 to 2.0.0

dist/errors.js

28

dist/index.js
'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var InvalidFlippersError = require('./errors').InvalidFlippersError;
var Flipper = (function () {
function Flipper(avalaibleFlippers) {
function Flipper() {
var avalaibleFlippers = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
_classCallCheck(this, Flipper);
this._avalaibleFlippers = avalaibleFlippers || [];
this._avalaibleFlippers = avalaibleFlippers;
this.isOn = this.isOn.bind(this);

@@ -28,3 +32,7 @@ this.isOff = this.isOff.bind(this);

key: 'create',
value: function create(avalaibleFlippers) {
value: function create() {
var avalaibleFlippers = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
if (!Array.isArray(avalaibleFlippers)) throw new InvalidFlippersError();
return new Flipper(avalaibleFlippers);

@@ -34,3 +42,7 @@ }

key: 'createForApiResponse',
value: function createForApiResponse(apiResponse) {
value: function createForApiResponse() {
var apiResponse = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
if (!Array.isArray(apiResponse)) throw new InvalidFlippersError();
var flippers = apiResponse.filter(function (flipper) {

@@ -49,2 +61,4 @@ return flipper.isOn;

module.exports = Flipper;
module.exports = Flipper;
module.exports.InvalidFlippersError = InvalidFlippersError;
//# sourceMappingURL=index.js.map
{
"name": "suite-flipper-js",
"version": "1.0.5",
"description": "Flipper Class",
"main": "dist/index.js",
"scripts": {
"test": "mocha test",
"build": "rm -rf dist/* && babel lib --ignore __tests__ --out-dir dist",
"prepublish": "npm test && npm run build"
"test": "npm run build && mocha test",
"build": "rm -rf dist/* && babel lib --out-dir dist --source-maps --presets es2015",
"prepublish": "npm test && npm run build",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"release": {
"verifyConditions": {
"path": "./node_modules/semantic-release/dist/lib/plugin-noop.js"
}
},
"repository": {

@@ -15,3 +20,3 @@ "type": "git",

},
"author": "Viktor Somodi <viktor.somodi@emarsys.com>",
"author": "Emartech",
"license": "ISC",

@@ -22,10 +27,10 @@ "bugs": {

"devDependencies": {
"babel": "^5.8.23",
"chai": "^3.2.0",
"lodash": "^3.10.1",
"mocha": "^2.2.5",
"sinon": "^1.16.1",
"sinon-chai": "^2.8.0"
"babel-cli": "6.3.17",
"babel-preset-es2015": "6.3.13",
"chai": "3.4.1",
"mocha": "2.3.4",
"semantic-release": "4.3.5"
},
"homepage": "https://github.com/emartech/flipper-js#readme"
}
"homepage": "https://github.com/emartech/flipper-js#readme",
"version": "2.0.0"
}

@@ -1,2 +0,2 @@

# suite-flipper-js
# Suite Flipper JS

@@ -3,0 +3,0 @@ Install

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