@flipfeatureflag/core 0.1.3 → 0.1.4

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/dist/index.js CHANGED
@@ -57,7 +57,7 @@ var HttpClient = class {
57
57
  constructor(options) {
58
58
  this.baseUrl = options.baseUrl.replace(/\/$/, "");
59
59
  this.sdkKey = options.sdkKey;
60
- this.fetchFn = options.fetchFn;
60
+ this.fetchFn = (options.fetchFn ?? globalThis.fetch).bind(globalThis);
61
61
  }
62
62
  async evaluate(request) {
63
63
  return this.post("/v1/sdk/flags/evaluate", request);
package/dist/index.mjs CHANGED
@@ -31,7 +31,7 @@ var HttpClient = class {
31
31
  constructor(options) {
32
32
  this.baseUrl = options.baseUrl.replace(/\/$/, "");
33
33
  this.sdkKey = options.sdkKey;
34
- this.fetchFn = options.fetchFn;
34
+ this.fetchFn = (options.fetchFn ?? globalThis.fetch).bind(globalThis);
35
35
  }
36
36
  async evaluate(request) {
37
37
  return this.post("/v1/sdk/flags/evaluate", request);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipfeatureflag/core",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "flipFeatureFlag core SDK",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",