expf-sigma-node.js 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/sigma.js +9 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expf-sigma-node.js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "expf-sigma-node.js lets you manage features flags and remote config across web, server side applications. Deliver true Continuous Integration. Get builds out faster. Control who has access to new features.",
|
|
5
5
|
"main": "public/sigma.js",
|
|
6
6
|
"keywords": [
|
package/public/sigma.js
CHANGED
|
@@ -6080,7 +6080,7 @@ var Sigma = class {
|
|
|
6080
6080
|
}
|
|
6081
6081
|
async checkFlag(flagName) {
|
|
6082
6082
|
if (!flagName) {
|
|
6083
|
-
return
|
|
6083
|
+
return null;
|
|
6084
6084
|
}
|
|
6085
6085
|
await this.updateCache();
|
|
6086
6086
|
const cacheKey = this.cache.parse("sigmaDataFile");
|
|
@@ -6096,7 +6096,7 @@ var Sigma = class {
|
|
|
6096
6096
|
}
|
|
6097
6097
|
}
|
|
6098
6098
|
if (!flag)
|
|
6099
|
-
return
|
|
6099
|
+
return null;
|
|
6100
6100
|
return this.findingSpotCondition(flag, this.sigmaUserData);
|
|
6101
6101
|
}
|
|
6102
6102
|
getFlag(key) {
|
|
@@ -6232,7 +6232,7 @@ var Sigma = class {
|
|
|
6232
6232
|
}
|
|
6233
6233
|
async getExperiment(experimentName) {
|
|
6234
6234
|
if (!experimentName) {
|
|
6235
|
-
return
|
|
6235
|
+
return null;
|
|
6236
6236
|
}
|
|
6237
6237
|
await this.updateCache();
|
|
6238
6238
|
const sigmaDataLs = await this.cache.parse(sigmaDataFile);
|
|
@@ -6272,7 +6272,7 @@ var Sigma = class {
|
|
|
6272
6272
|
}
|
|
6273
6273
|
const getParamValue = (paramName) => {
|
|
6274
6274
|
if (!paramName || !experiment) {
|
|
6275
|
-
return
|
|
6275
|
+
return null;
|
|
6276
6276
|
}
|
|
6277
6277
|
const groupName = this.cache.get(localStorageGroupName);
|
|
6278
6278
|
let params = null;
|
|
@@ -6283,7 +6283,7 @@ var Sigma = class {
|
|
|
6283
6283
|
}
|
|
6284
6284
|
}
|
|
6285
6285
|
if (!params) {
|
|
6286
|
-
return
|
|
6286
|
+
return null;
|
|
6287
6287
|
}
|
|
6288
6288
|
let paramValue = null;
|
|
6289
6289
|
for (let item in params.values) {
|
|
@@ -6292,13 +6292,13 @@ var Sigma = class {
|
|
|
6292
6292
|
}
|
|
6293
6293
|
}
|
|
6294
6294
|
if (!paramValue) {
|
|
6295
|
-
return
|
|
6295
|
+
return null;
|
|
6296
6296
|
}
|
|
6297
6297
|
return paramValue;
|
|
6298
6298
|
};
|
|
6299
6299
|
const getFeatureValue = (flagName) => {
|
|
6300
6300
|
if (!flagName || !experiment) {
|
|
6301
|
-
return
|
|
6301
|
+
return null;
|
|
6302
6302
|
}
|
|
6303
6303
|
const groupName = this.cache.get(localStorageGroupName);
|
|
6304
6304
|
let flagExperiment = null;
|
|
@@ -6309,7 +6309,7 @@ var Sigma = class {
|
|
|
6309
6309
|
}
|
|
6310
6310
|
}
|
|
6311
6311
|
if (!flagExperiment)
|
|
6312
|
-
return
|
|
6312
|
+
return null;
|
|
6313
6313
|
let flag = null;
|
|
6314
6314
|
for (let i = 0; i < flagExperiment.groups.length; i++) {
|
|
6315
6315
|
if (flagExperiment.groups[i]["group"] === groupName) {
|
|
@@ -6318,7 +6318,7 @@ var Sigma = class {
|
|
|
6318
6318
|
}
|
|
6319
6319
|
}
|
|
6320
6320
|
if (!flag)
|
|
6321
|
-
return
|
|
6321
|
+
return null;
|
|
6322
6322
|
return this.findingSpotCondition(flag, false, experiment);
|
|
6323
6323
|
};
|
|
6324
6324
|
return {
|