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

@kameleoon/javascript-sdk-core

Package Overview
Dependencies
Maintainers
3
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kameleoon/javascript-sdk-core - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

28

dist/kameleoonClient.js

@@ -102,3 +102,12 @@ "use strict";

}
const userAgent = _utilities.Utilities.getUserAgent(visitorCode, this.campaignConfiguration);
const dataUrl = _utilities.Utilities.getDataUrl(visitorCode, this.campaignConfiguration);
const targetingData = this.campaignConfiguration.storedTargetingData[visitorCode];
const trackingParameters = {
body: dataUrl,
visitorCode,
experimentId
};
let variationId = _constants.UNALLOCATED_VARIATION_ID;
let isUnallocated = true;
const targetingResult = _utilities.Utilities.checkTargeting({

@@ -111,17 +120,7 @@ visitorCode,

}).throw();
if (!targetingResult) {
throw new _kameleoonError.KameleoonError(_kameleoonError.KameleoonException.NotTargeted, visitorCode);
}
const dataUrl = _utilities.Utilities.getDataUrl(visitorCode, this.campaignConfiguration);
const trackingParameters = {
body: dataUrl,
visitorCode,
experimentId
};
const userAgent = _utilities.Utilities.getUserAgent(visitorCode, this.campaignConfiguration);
const variationId = this.variationConfiguration.getAssociatedVariationId(visitorCode, experimentId).else(error => {
variationId = this.variationConfiguration.getAssociatedVariationId(visitorCode, experimentId).else(error => {
if (error.type === _kameleoonError.KameleoonException.NotAllocated) {
this.requester.trackExperiment(_objectSpread({
variationId: _constants.UNALLOCATED_VARIATION_ID,
isUnallocated: true,
variationId,
userAgent

@@ -135,5 +134,8 @@ }, trackingParameters));

variationId,
isUnallocated: false,
isUnallocated,
userAgent
}, trackingParameters));
if (!targetingResult) {
throw new _kameleoonError.KameleoonError(_kameleoonError.KameleoonException.NotTargeted, visitorCode);
}
_utilities.Utilities.updateCache({

@@ -140,0 +142,0 @@ cacheManager: this.trackingCache,

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

const resultVariationId = variationId || 0;
const isUnallocated = !variationId;
const isUnallocated = variationId === null;
const callback = () => campaignConfiguration.clearUnsentData;

@@ -75,0 +75,0 @@ requester.trackExperiment({

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

});
if (ruleHash < exposition) {
if (ruleHash <= exposition) {
let totalDeviation = 0;

@@ -106,0 +106,0 @@ const variationHash = _hasher.Hasher.obtainFeatureFlagHashDouble({

{
"name": "@kameleoon/javascript-sdk-core",
"version": "2.2.0",
"version": "2.2.1",
"description": "Kameleoon JS SDK Core",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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