@openfeature/js-sdk
Advanced tools
Comparing version 1.0.99-experimental-b56a9f3eb51dbaa642a70d837db141dd22f100da to 1.0.99-experimental-c0ef9396b49bd01df7faa7690a7e5587d182956f
@@ -356,10 +356,9 @@ "use strict"; | ||
attachListeners() { | ||
var _a, _b, _c; | ||
(_a = this.providerAccessor().events) == null ? void 0 : _a.on("ready" /* Ready */, () => this.runAllHandlers("ready" /* Ready */)); | ||
(_b = this.providerAccessor().events) == null ? void 0 : _b.on("configurationChanged" /* ConfigurationChanged */, () => this.runAllHandlers("configurationChanged" /* ConfigurationChanged */)); | ||
(_c = this.providerAccessor().events) == null ? void 0 : _c.on("error" /* Error */, () => this.runAllHandlers("error" /* Error */)); | ||
Object.values(ProviderEvents).forEach((e) => { | ||
var _a; | ||
return (_a = this.providerAccessor().events) == null ? void 0 : _a.on(e, () => { | ||
this._handlerWrappers.filter((wrapper) => wrapper.eventType === e).forEach((wrapper) => wrapper.handler()); | ||
}); | ||
}); | ||
} | ||
runAllHandlers(eventType) { | ||
this._handlerWrappers.filter((wrapper) => wrapper.eventType === eventType).forEach((wrapper) => wrapper.handler()); | ||
} | ||
}; | ||
@@ -366,0 +365,0 @@ |
@@ -322,10 +322,9 @@ var __defProp = Object.defineProperty; | ||
attachListeners() { | ||
var _a, _b, _c; | ||
(_a = this.providerAccessor().events) == null ? void 0 : _a.on("ready" /* Ready */, () => this.runAllHandlers("ready" /* Ready */)); | ||
(_b = this.providerAccessor().events) == null ? void 0 : _b.on("configurationChanged" /* ConfigurationChanged */, () => this.runAllHandlers("configurationChanged" /* ConfigurationChanged */)); | ||
(_c = this.providerAccessor().events) == null ? void 0 : _c.on("error" /* Error */, () => this.runAllHandlers("error" /* Error */)); | ||
Object.values(ProviderEvents).forEach((e) => { | ||
var _a; | ||
return (_a = this.providerAccessor().events) == null ? void 0 : _a.on(e, () => { | ||
this._handlerWrappers.filter((wrapper) => wrapper.eventType === e).forEach((wrapper) => wrapper.handler()); | ||
}); | ||
}); | ||
} | ||
runAllHandlers(eventType) { | ||
this._handlerWrappers.filter((wrapper) => wrapper.eventType === eventType).forEach((wrapper) => wrapper.handler()); | ||
} | ||
}; | ||
@@ -332,0 +331,0 @@ |
@@ -38,4 +38,3 @@ import { Client, ClientMetadata, EvaluationContext, EvaluationDetails, FlagEvaluationOptions, FlagValue, Handler, Hook, JsonValue, Logger, Provider, ProviderEvents } from './types'; | ||
private attachListeners; | ||
private runAllHandlers; | ||
} | ||
export {}; |
{ | ||
"name": "@openfeature/js-sdk", | ||
"version": "1.0.99-experimental-b56a9f3eb51dbaa642a70d837db141dd22f100da", | ||
"version": "1.0.99-experimental-c0ef9396b49bd01df7faa7690a7e5587d182956f", | ||
"description": "OpenFeature SDK for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
183414
1719