@ninetailed/experience.js 2.0.0-beta.16 → 2.0.0-beta.19

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/index.esm.js CHANGED
@@ -3891,7 +3891,7 @@ const selectExperience = ({
3891
3891
  const trafficRandom = getTrafficRandom(profile, experience);
3892
3892
  log(`The traffic random factor for experience ${experience.id} is ${trafficRandom}. It's traffic allocation is set to ${experience.trafficAllocation}.`);
3893
3893
  const isInTrafficRange = experience.trafficAllocation > trafficRandom;
3894
- const matchesAudience = experience.audience && includes(profile.audiences, experience.audience.id);
3894
+ const matchesAudience = !experience.audience || includes(profile.audiences, experience.audience.id);
3895
3895
  const hasActiveExperiment = find(activeExperiments, {
3896
3896
  id: experience.id
3897
3897
  });
package/index.umd.js CHANGED
@@ -3817,7 +3817,7 @@
3817
3817
  var trafficRandom = getTrafficRandom(profile, experience);
3818
3818
  log("The traffic random factor for experience ".concat(experience.id, " is ").concat(trafficRandom, ". It's traffic allocation is set to ").concat(experience.trafficAllocation, "."));
3819
3819
  var isInTrafficRange = experience.trafficAllocation > trafficRandom;
3820
- var matchesAudience = experience.audience && includes__default["default"](profile.audiences, experience.audience.id);
3820
+ var matchesAudience = !experience.audience || includes__default["default"](profile.audiences, experience.audience.id);
3821
3821
  var hasActiveExperiment = find__default["default"](activeExperiments, {
3822
3822
  id: experience.id
3823
3823
  });
@@ -46,11 +46,12 @@ export interface NinetailedInstance {
46
46
  debug: Debug;
47
47
  profileState: ProfileState;
48
48
  onProfileChange: OnProfileChange;
49
+ plugins: AnalyticsPlugin[];
49
50
  }
50
51
  export declare class Ninetailed implements NinetailedInstance {
51
52
  private readonly instance;
52
- private readonly plugins;
53
53
  private _profileState;
54
+ readonly plugins: AnalyticsPlugin[];
54
55
  constructor({ clientId, environment, }: {
55
56
  clientId: string;
56
57
  environment?: string;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ninetailed/experience.js",
3
- "version": "2.0.0-beta.16",
3
+ "version": "2.0.0-beta.19",
4
4
  "main": "./index.umd.js",
5
5
  "module": "./index.esm.js",
6
6
  "typings": "./index.d.ts",
7
7
  "dependencies": {
8
8
  "analytics": "^0.8.0",
9
- "@ninetailed/experience.js-shared": "2.0.0-beta.16",
9
+ "@ninetailed/experience.js-shared": "2.0.0-beta.19",
10
10
  "uuid": "^8.3.2",
11
11
  "ts-toolbelt": "^9.6.0",
12
12
  "locale-enum": "^1.1.1",