New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@amplitude/experiment-js-client

Package Overview
Dependencies
Maintainers
21
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplitude/experiment-js-client - npm Package Compare versions

Comparing version

to
1.9.4

58

dist/experiment.es2015.js

@@ -293,3 +293,3 @@ import { AnalyticsConnector } from '@amplitude/analytics-connector';

var version = "1.9.3";
var version = "1.9.4";

@@ -422,38 +422,34 @@ class ConnectorUserProvider {

load() {
return __awaiter(this, void 0, void 0, function* () {
const rawValues = this.storage.get(this.namespace);
let jsonValues;
const rawValues = this.storage.get(this.namespace);
let jsonValues;
try {
jsonValues = JSON.parse(rawValues) || {};
}
catch (_a) {
// Do nothing
return;
}
const values = {};
for (const key of Object.keys(jsonValues)) {
try {
jsonValues = JSON.parse(rawValues) || {};
let value;
if (this.transformer) {
value = this.transformer(jsonValues[key]);
}
else {
value = jsonValues[key];
}
if (value) {
values[key] = value;
}
}
catch (_a) {
catch (_b) {
// Do nothing
return;
}
const values = {};
for (const key of Object.keys(jsonValues)) {
try {
let value;
if (this.transformer) {
value = this.transformer(jsonValues[key]);
}
else {
value = jsonValues[key];
}
if (value) {
values[key] = value;
}
}
catch (_b) {
// Do nothing
}
}
this.clear();
this.putAll(values);
});
}
this.clear();
this.putAll(values);
}
store(values = this.cache) {
return __awaiter(this, void 0, void 0, function* () {
this.storage.put(this.namespace, JSON.stringify(values));
});
this.storage.put(this.namespace, JSON.stringify(values));
}

@@ -460,0 +456,0 @@ }

@@ -18,5 +18,5 @@ import { EvaluationFlag } from '@amplitude/experiment-core';

clear(): void;
load(): Promise<void>;
store(values?: Record<string, V>): Promise<void>;
load(): void;
store(values?: Record<string, V>): void;
}
export declare const transformVariantFromStorage: (storageValue: unknown) => Variant;
{
"name": "@amplitude/experiment-js-client",
"version": "1.9.3",
"version": "1.9.4",
"description": "Amplitude Experiment Javascript Client SDK",

@@ -50,3 +50,3 @@ "keywords": [

],
"gitHead": "f9fb923fc19dbf4a177b5fb81dc7b39b195a7950"
"gitHead": "febe36e15cdd6dc44ab5da4678e353c12ee3cef9"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display