You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please check the [Github Releases](https://github.com/configcat/node-sdk/releases) page for the changelog of the ConfigCat SDK for Node.js.
> We strongly recommend using the *ConfigCat Client* as a Singleton object in your application.
33
+
> You can acquire singleton client instances for your SDK keys using the `getClient("<sdkKey>")` factory function.
34
+
(However, please keep in mind that subsequent calls to `getClient()` with the *same SDK Key* return a *shared* client instance, which was set up by the first call.)
Copy file name to clipboardExpand all lines: src/client.ts
+20-9
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,14 @@ import { HttpConfigFetcher } from "./config-fetcher";
5
5
importCONFIGCAT_SDK_VERSIONfrom"./version";
6
6
7
7
/**
8
-
* Returns an instance of ConfigCatClient for the specified SDK Key.
8
+
* Returns an instance of `ConfigCatClient` for the specified SDK Key.
9
9
* @remarks This method returns a single, shared instance per each distinct SDK Key.
10
10
* That is, a new client object is created only when there is none available for the specified SDK Key.
11
-
* Otherwise, the already created instance is returned (in which case the 'pollingMode' and 'options' arguments are ignored).
11
+
* Otherwise, the already created instance is returned (in which case the `pollingMode` and `options` arguments are ignored).
12
12
* So, please keep in mind that when you make multiple calls to this method using the same SDK Key, you may end up with multiple references to the same client object.
13
-
* @param sdkKey SDK Key to access configuration
14
-
* @param pollingMode The polling mode to use
15
-
* @param options Options for the specified polling mode
13
+
* @param sdkKey SDK Key to access the ConfigCat config.
14
+
* @param pollingMode The polling mode to use.
15
+
* @param options Options for the specified polling mode.
0 commit comments