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

configcat-common

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

configcat-common - npm Package Compare versions

Comparing version 2.0.4 to 2.0.6

lib/Semver.d.ts

4

lib/ConfigCatClient.js

@@ -43,3 +43,3 @@ "use strict";

var RolloutEvaluator_1 = require("./RolloutEvaluator");
var sha1 = require("js-sha1");
var Sha1_1 = require("./Sha1");
exports.CONFIG_CHANGE_EVENT_NAME = "changed";

@@ -176,3 +176,3 @@ var ConfigCatClient = /** @class */ (function () {

default:
variationId += sha1('' + value);
variationId += Sha1_1.sha1('' + value);
break;

@@ -179,0 +179,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var sha1 = require("js-sha1");
var ProjectConfig_1 = require("./ProjectConfig");
var semver = require("semver/preload");
var Sha1_1 = require("./Sha1");
var semver = require("./Semver");
var util_1 = require("util");

@@ -48,5 +48,3 @@ /** Object for variation evaluation */

result.Value = result.EvaluateLog.ReturnValue = this.EvaluateVariations(config.ConfigJSON[key][ProjectConfig_1.Setting.RolloutPercentageItems], key, user);
if (config.ConfigJSON[key][ProjectConfig_1.Setting.RolloutPercentageItems].length > 0) {
result.EvaluateLog.OpAppendLine("Evaluating % options => " + (result.Value == null ? "user not targeted" : "user targeted"));
}
result.EvaluateLog.OpAppendLine("Evaluate % option => " + (result.Value == null ? "user not targeted" : "user targeted"));
}

@@ -179,3 +177,3 @@ }

var hashCandidate = key + User.identifier;
var hashValue = sha1(hashCandidate).substring(0, 7);
var hashValue = Sha1_1.sha1(hashCandidate).substring(0, 7);
var hashScale = parseInt(hashValue, 16) % 100;

@@ -243,3 +241,3 @@ var bucket = 0;

if (!found) {
found = semver.eq(v1, sv[ci].trim(), true);
found = semver.looseeq(v1, sv[ci].trim());
}

@@ -300,33 +298,27 @@ }

case 0:
return "IS ONE OF";
case 4:
return "IN";
case 1:
return "IS NOT ONE OF";
case 5:
return "NOT IN";
case 2:
return "CONTAINS";
case 3:
return "DOES NOT CONTAIN";
case 4:
return "IS ONE OF (SemVer)";
case 5:
return "IS NOT ONE OF (SemVer)";
return "NOT CONTAINS";
case 6:
return "< (SemVer)";
case 12:
return "<";
case 7:
return "<= (SemVer)";
case 13:
return "<=";
case 8:
return "> (SemVer)";
case 14:
return ">";
case 9:
return ">= (SemVer)";
case 15:
return ">=";
case 10:
return "= (Number)";
return "=";
case 11:
return "!= (Number)";
case 12:
return "< (Number)";
case 13:
return "<= (Number)";
case 14:
return "> (Number)";
case 15:
return ">= (Number)";
return "!=";
default:

@@ -333,0 +325,0 @@ return rule;

{
"name": "configcat-common",
"version": "2.0.4",
"version": "2.0.6",
"description": "ConfigCat is a configuration as a service that lets you manage your features and configurations without actually deploying new code.",

@@ -27,6 +27,3 @@ "main": "lib/index.js",

"license": "MIT",
"dependencies": {
"js-sha1": "^0.6.0",
"semver": "^7.1.1"
},
"dependencies": {},
"devDependencies": {

@@ -33,0 +30,0 @@ "@types/chai": "4.1.7",

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