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

@splitsoftware/splitio

Package Overview
Dependencies
Maintainers
2
Versions
487
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@splitsoftware/splitio - npm Package Compare versions

Comparing version 0.20.0 to 0.21.0

14

es6/index.js

@@ -16,15 +16,13 @@ /* @flow */ 'use strict';

return {
getTreatment(key /*: string */, featureName /*: string */, defaultTreatment /*: string */) /*: string */ {
getTreatment(key /*: string */, featureName /*: string */) /*: string */ {
let split = storage.splits.get(featureName);
let treatment = null;
let treatment = 'control';
let stop = tracker();
if (split) {
treatment = split.getTreatment(key, defaultTreatment);
treatment = split.getTreatment(key);
log(`feature ${featureName} key ${key} evaluated as ${treatment}`);
} else {
treatment = defaultTreatment;
log(`feature ${featureName} doesn't exist, using default ${treatment}`);
log(`feature ${featureName} doesn't exist`);
}

@@ -34,6 +32,2 @@ stop();

return treatment;
},
isTreatment(key /*: string */, featureName /*: string */, treatment /*: string */) /*: bool */ {
return this.getTreatment(key, featureName) === treatment;
}

@@ -40,0 +34,0 @@ };

@@ -16,15 +16,13 @@ /* @flow */'use strict';

return {
getTreatment: function getTreatment(key /*: string */, featureName /*: string */, defaultTreatment /*: string */) /*: string */{
getTreatment: function getTreatment(key /*: string */, featureName /*: string */) /*: string */{
var split = storage.splits.get(featureName);
var treatment = null;
var treatment = 'control';
var stop = tracker();
if (split) {
treatment = split.getTreatment(key, defaultTreatment);
treatment = split.getTreatment(key);
log('feature ' + featureName + ' key ' + key + ' evaluated as ' + treatment);
} else {
treatment = defaultTreatment;
log('feature ' + featureName + ' doesn\'t exist, using default ' + treatment);
log('feature ' + featureName + ' doesn\'t exist');
}

@@ -34,5 +32,2 @@ stop();

return treatment;
},
isTreatment: function isTreatment(key /*: string */, featureName /*: string */, treatment /*: string */) /*: bool */{
return this.getTreatment(key, featureName) === treatment;
}

@@ -39,0 +34,0 @@ };

{
"name": "@splitsoftware/splitio",
"version": "0.20.0",
"version": "0.21.0",
"description": "Split SDK",

@@ -20,4 +20,4 @@ "author": "Facundo Cabrera <facundo@split.io>",

"dependencies": {
"@splitsoftware/splitio-metrics": "0.20.0",
"@splitsoftware/splitio-cache": "0.20.0",
"@splitsoftware/splitio-metrics": "0.21.0",
"@splitsoftware/splitio-cache": "0.21.0",
"debug": "^2.2.0"

@@ -24,0 +24,0 @@ },

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