@openfeature/core
Advanced tools
Comparing version 0.0.20 to 0.0.21
@@ -384,9 +384,18 @@ "use strict"; | ||
/** | ||
* Get metadata about registered provider. | ||
* Get metadata about the default provider. | ||
* @returns {ProviderMetadata} Provider Metadata | ||
*/ | ||
get providerMetadata() { | ||
return this._defaultProvider.metadata; | ||
return this.getProviderMetadata(); | ||
} | ||
/** | ||
* Get metadata about a registered provider using the client name. | ||
* An unbound or empty client name will return metadata from the default provider. | ||
* @param {string} [clientName] The name to identify the client | ||
* @returns {ProviderMetadata} Provider Metadata | ||
*/ | ||
getProviderMetadata(clientName) { | ||
return this.getProviderForClient(clientName).metadata; | ||
} | ||
/** | ||
* Adds a handler for the given provider event type. | ||
@@ -393,0 +402,0 @@ * The handlers are called in the order they have been added. |
@@ -340,9 +340,18 @@ var __defProp = Object.defineProperty; | ||
/** | ||
* Get metadata about registered provider. | ||
* Get metadata about the default provider. | ||
* @returns {ProviderMetadata} Provider Metadata | ||
*/ | ||
get providerMetadata() { | ||
return this._defaultProvider.metadata; | ||
return this.getProviderMetadata(); | ||
} | ||
/** | ||
* Get metadata about a registered provider using the client name. | ||
* An unbound or empty client name will return metadata from the default provider. | ||
* @param {string} [clientName] The name to identify the client | ||
* @returns {ProviderMetadata} Provider Metadata | ||
*/ | ||
getProviderMetadata(clientName) { | ||
return this.getProviderForClient(clientName).metadata; | ||
} | ||
/** | ||
* Adds a handler for the given provider event type. | ||
@@ -349,0 +358,0 @@ * The handlers are called in the order they have been added. |
@@ -517,3 +517,3 @@ type FlagValueType = 'boolean' | 'string' | 'number' | 'object'; | ||
/** | ||
* Get metadata about registered provider. | ||
* Get metadata about the default provider. | ||
* @returns {ProviderMetadata} Provider Metadata | ||
@@ -523,2 +523,9 @@ */ | ||
/** | ||
* Get metadata about a registered provider using the client name. | ||
* An unbound or empty client name will return metadata from the default provider. | ||
* @param {string} [clientName] The name to identify the client | ||
* @returns {ProviderMetadata} Provider Metadata | ||
*/ | ||
getProviderMetadata(clientName?: string): ProviderMetadata; | ||
/** | ||
* Adds a handler for the given provider event type. | ||
@@ -525,0 +532,0 @@ * The handlers are called in the order they have been added. |
{ | ||
"name": "@openfeature/core", | ||
"version": "0.0.20", | ||
"version": "0.0.21", | ||
"description": "Shared OpenFeature JS components (server and web)", | ||
@@ -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
165255
1734