expf-sigma-node.js 0.1.1 → 0.1.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/sigma.js +8 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expf-sigma-node.js",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
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 false;
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 false;
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 false;
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 false;
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 false;
6286
+ return null;
6287
6287
  }
6288
6288
  let paramValue = null;
6289
6289
  for (let item in params.values) {
@@ -6291,14 +6291,11 @@ var Sigma = class {
6291
6291
  paramValue = doTypeConversion(params.type, params.values[item].value);
6292
6292
  }
6293
6293
  }
6294
- if (!paramValue) {
6295
- return false;
6296
- }
6297
6294
  return paramValue;
6298
6295
  };
6299
6296
  const getFeatureValue = (flagName) => {
6300
6297
  if (!flagName || !experiment) {
6301
- return false;
6298
+ return null;
6302
6299
  }
6303
6300
  const groupName = this.cache.get(localStorageGroupName);
6304
6301
  let flagExperiment = null;
@@ -6309,7 +6306,7 @@ var Sigma = class {
6309
6306
  }
6310
6307
  }
6311
6308
  if (!flagExperiment)
6312
- return false;
6309
+ return null;
6313
6310
  let flag = null;
6314
6311
  for (let i = 0; i < flagExperiment.groups.length; i++) {
6315
6312
  if (flagExperiment.groups[i]["group"] === groupName) {
@@ -6318,7 +6315,7 @@ var Sigma = class {
6318
6315
  }
6319
6316
  }
6320
6317
  if (!flag)
6321
- return false;
6318
+ return null;
6322
6319
  return this.findingSpotCondition(flag, false, experiment);
6323
6320
  };
6324
6321
  return {