@flopflip/adapter-utilities 1.0.32 → 12.3.6

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.
@@ -19,16 +19,15 @@ var denormalizeFlagName = function denormalizeFlagName(flagName) {
19
19
 
20
20
  var exposeGlobally = function exposeGlobally(adapter) {
21
21
  var globalThis = getGlobalThis__default["default"]();
22
-
23
22
  if (!globalThis.__flopflip__) {
24
23
  globalThis.__flopflip__ = {};
25
24
  }
26
-
27
25
  globalThis.__flopflip__[adapter.id] = adapter;
28
26
  };
29
27
 
30
28
  var normalizeFlag = function normalizeFlag(flagName, flagValue) {
31
- return [camelCase__default["default"](flagName), // Multi variate flags contain a string or `null` - `false` seems more natural.
29
+ return [camelCase__default["default"](flagName),
30
+ // Multi variate flags contain a string or `null` - `false` seems more natural.
32
31
  // eslint-disable-next-line no-eq-null, eqeqeq, @typescript-eslint/prefer-nullish-coalescing
33
32
  flagValue == null ? false : flagValue];
34
33
  };
@@ -37,15 +36,13 @@ var normalizeFlags = function normalizeFlags(rawFlags) {
37
36
  var normalizeFlag$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : normalizeFlag;
38
37
  return Object.entries(rawFlags || {}).reduce(function (normalizedFlags, _ref) {
39
38
  var _ref2 = _slicedToArray(_ref, 2),
40
- flagName = _ref2[0],
41
- flagValue = _ref2[1];
42
-
39
+ flagName = _ref2[0],
40
+ flagValue = _ref2[1];
43
41
  var _normalizeFlag = normalizeFlag$1(flagName, flagValue),
44
- _normalizeFlag2 = _slicedToArray(_normalizeFlag, 2),
45
- normalizedFlagName = _normalizeFlag2[0],
46
- normalizedFlagValue = _normalizeFlag2[1]; // Can't return expression as it is the assigned value
47
-
48
-
42
+ _normalizeFlag2 = _slicedToArray(_normalizeFlag, 2),
43
+ normalizedFlagName = _normalizeFlag2[0],
44
+ normalizedFlagValue = _normalizeFlag2[1];
45
+ // Can't return expression as it is the assigned value
49
46
  normalizedFlags[normalizedFlagName] = normalizedFlagValue;
50
47
  return normalizedFlags;
51
48
  }, {});
@@ -19,16 +19,15 @@ var denormalizeFlagName = function denormalizeFlagName(flagName) {
19
19
 
20
20
  var exposeGlobally = function exposeGlobally(adapter) {
21
21
  var globalThis = getGlobalThis__default["default"]();
22
-
23
22
  if (!globalThis.__flopflip__) {
24
23
  globalThis.__flopflip__ = {};
25
24
  }
26
-
27
25
  globalThis.__flopflip__[adapter.id] = adapter;
28
26
  };
29
27
 
30
28
  var normalizeFlag = function normalizeFlag(flagName, flagValue) {
31
- return [camelCase__default["default"](flagName), // Multi variate flags contain a string or `null` - `false` seems more natural.
29
+ return [camelCase__default["default"](flagName),
30
+ // Multi variate flags contain a string or `null` - `false` seems more natural.
32
31
  // eslint-disable-next-line no-eq-null, eqeqeq, @typescript-eslint/prefer-nullish-coalescing
33
32
  flagValue == null ? false : flagValue];
34
33
  };
@@ -37,15 +36,13 @@ var normalizeFlags = function normalizeFlags(rawFlags) {
37
36
  var normalizeFlag$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : normalizeFlag;
38
37
  return Object.entries(rawFlags || {}).reduce(function (normalizedFlags, _ref) {
39
38
  var _ref2 = _slicedToArray(_ref, 2),
40
- flagName = _ref2[0],
41
- flagValue = _ref2[1];
42
-
39
+ flagName = _ref2[0],
40
+ flagValue = _ref2[1];
43
41
  var _normalizeFlag = normalizeFlag$1(flagName, flagValue),
44
- _normalizeFlag2 = _slicedToArray(_normalizeFlag, 2),
45
- normalizedFlagName = _normalizeFlag2[0],
46
- normalizedFlagValue = _normalizeFlag2[1]; // Can't return expression as it is the assigned value
47
-
48
-
42
+ _normalizeFlag2 = _slicedToArray(_normalizeFlag, 2),
43
+ normalizedFlagName = _normalizeFlag2[0],
44
+ normalizedFlagValue = _normalizeFlag2[1];
45
+ // Can't return expression as it is the assigned value
49
46
  normalizedFlags[normalizedFlagName] = normalizedFlagValue;
50
47
  return normalizedFlags;
51
48
  }, {});
@@ -9,16 +9,15 @@ var denormalizeFlagName = function denormalizeFlagName(flagName) {
9
9
 
10
10
  var exposeGlobally = function exposeGlobally(adapter) {
11
11
  var globalThis = getGlobalThis();
12
-
13
12
  if (!globalThis.__flopflip__) {
14
13
  globalThis.__flopflip__ = {};
15
14
  }
16
-
17
15
  globalThis.__flopflip__[adapter.id] = adapter;
18
16
  };
19
17
 
20
18
  var normalizeFlag = function normalizeFlag(flagName, flagValue) {
21
- return [camelCase(flagName), // Multi variate flags contain a string or `null` - `false` seems more natural.
19
+ return [camelCase(flagName),
20
+ // Multi variate flags contain a string or `null` - `false` seems more natural.
22
21
  // eslint-disable-next-line no-eq-null, eqeqeq, @typescript-eslint/prefer-nullish-coalescing
23
22
  flagValue == null ? false : flagValue];
24
23
  };
@@ -27,15 +26,13 @@ var normalizeFlags = function normalizeFlags(rawFlags) {
27
26
  var normalizeFlag$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : normalizeFlag;
28
27
  return Object.entries(rawFlags || {}).reduce(function (normalizedFlags, _ref) {
29
28
  var _ref2 = _slicedToArray(_ref, 2),
30
- flagName = _ref2[0],
31
- flagValue = _ref2[1];
32
-
29
+ flagName = _ref2[0],
30
+ flagValue = _ref2[1];
33
31
  var _normalizeFlag = normalizeFlag$1(flagName, flagValue),
34
- _normalizeFlag2 = _slicedToArray(_normalizeFlag, 2),
35
- normalizedFlagName = _normalizeFlag2[0],
36
- normalizedFlagValue = _normalizeFlag2[1]; // Can't return expression as it is the assigned value
37
-
38
-
32
+ _normalizeFlag2 = _slicedToArray(_normalizeFlag, 2),
33
+ normalizedFlagName = _normalizeFlag2[0],
34
+ normalizedFlagValue = _normalizeFlag2[1];
35
+ // Can't return expression as it is the assigned value
39
36
  normalizedFlags[normalizedFlagName] = normalizedFlagValue;
40
37
  return normalizedFlags;
41
38
  }, {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flopflip/adapter-utilities",
3
- "version": "1.0.32",
3
+ "version": "12.3.6",
4
4
  "description": "Adapter utilities for flipflop",
5
5
  "main": "dist/flopflip-adapter-utilities.cjs.js",
6
6
  "module": "dist/flopflip-adapter-utilities.esm.js",
@@ -28,13 +28,13 @@
28
28
  "types"
29
29
  ],
30
30
  "dependencies": {
31
- "@babel/runtime": "7.19.0",
32
- "@flopflip/types": "4.1.27",
31
+ "@babel/runtime": "7.19.4",
32
+ "@flopflip/types": "12.3.6",
33
33
  "globalthis": "1.0.3",
34
34
  "lodash": "4.17.21"
35
35
  },
36
36
  "devDependencies": {
37
- "typescript": "4.8.3"
37
+ "typescript": "4.8.4"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "typescript": "4.x"