@dereekb/util 13.4.1 → 13.4.2

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@dereekb/util/fetch",
3
- "version": "13.4.1",
3
+ "version": "13.4.2",
4
4
  "peerDependencies": {
5
- "@dereekb/util": "13.4.1",
5
+ "@dereekb/util": "13.4.2",
6
6
  "make-error": "^1.3.0",
7
7
  "fast-content-type-parse": "^3.0.0"
8
8
  },
package/index.cjs.js CHANGED
@@ -1345,13 +1345,11 @@ function _unsupported_iterable_to_array$z(o, minLen) {
1345
1345
  */ function invertBooleanReturnFunction(decisionFn) {
1346
1346
  var invert = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
1347
1347
  if (invert) {
1348
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1349
1348
  return function() {
1350
1349
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
1351
1350
  args[_key] = arguments[_key];
1352
1351
  }
1353
1352
  var _decisionFn;
1354
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1355
1353
  var result = (_decisionFn = decisionFn).call.apply(_decisionFn, [
1356
1354
  undefined
1357
1355
  ].concat(_to_consumable_array$o(args)));
@@ -1521,7 +1519,6 @@ function _type_of$l(obj) {
1521
1519
  * @param value - the value to check
1522
1520
  * @returns `true` if the value is a non-empty string or is `true`
1523
1521
  */ function isStringOrTrue(value) {
1524
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
1525
1522
  return Boolean(value || value !== '');
1526
1523
  }
1527
1524
  /**
@@ -2121,7 +2118,6 @@ function makeModelMap(input, read) {
2121
2118
  var map = new Map();
2122
2119
  input.forEach(function(x) {
2123
2120
  var _read;
2124
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
2125
2121
  var keys = (_read = read(x)) !== null && _read !== void 0 ? _read : [];
2126
2122
  keys.forEach(function(key) {
2127
2123
  return map.set(key, x);
@@ -2144,7 +2140,6 @@ function makeModelMap(input, read) {
2144
2140
  */ function useModelOrKey(input, param) {
2145
2141
  var useModel = param.useModel, useKey = param.useKey, _param_required = param.required, required = _param_required === void 0 ? false : _param_required;
2146
2142
  var result;
2147
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
2148
2143
  if (input != null) {
2149
2144
  if (isModelKey(input)) {
2150
2145
  result = useKey(input);
@@ -2182,7 +2177,6 @@ function makeModelMap(input, read) {
2182
2177
  function readModelKey(input) {
2183
2178
  var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref_required = _ref.required, required = _ref_required === void 0 ? false : _ref_required, _ref_read = _ref.read, read = _ref_read === void 0 ? readUniqueModelKey : _ref_read;
2184
2179
  var key;
2185
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
2186
2180
  switch(typeof input === "undefined" ? "undefined" : _type_of$k(input)){
2187
2181
  case 'string':
2188
2182
  key = input;
@@ -2220,7 +2214,6 @@ function readModelKey(input) {
2220
2214
  * @param input - A model object or a key string
2221
2215
  * @returns `true` if the input is a string key
2222
2216
  */ function isModelKey(input) {
2223
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
2224
2217
  switch(typeof input === "undefined" ? "undefined" : _type_of$k(input)){
2225
2218
  case 'string':
2226
2219
  return true;
@@ -3301,7 +3294,6 @@ function _unsupported_iterable_to_array$s(o, minLen) {
3301
3294
  var map = new Map();
3302
3295
  values.forEach(function(x) {
3303
3296
  var _read;
3304
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
3305
3297
  var keys = (_read = read(x)) !== null && _read !== void 0 ? _read : [];
3306
3298
  keys.forEach(function(key) {
3307
3299
  return map.set(key, x);
@@ -3530,8 +3522,7 @@ function _unsupported_iterable_to_array$s(o, minLen) {
3530
3522
  *
3531
3523
  * @param obj - The value to check.
3532
3524
  * @returns Whether the value is a function with a constructor.
3533
- */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- type guard accepting any value
3534
- function isObjectWithConstructor(obj) {
3525
+ */ function isObjectWithConstructor(obj) {
3535
3526
  return typeof obj === 'function' && !!obj.prototype && !!obj.constructor && !!obj.prototype.constructor.name;
3536
3527
  }
3537
3528
  /**
@@ -3620,7 +3611,6 @@ function getValueFromGetter(input, args) {
3620
3611
  * @returns An ObjectCopyFactory for the input
3621
3612
  */ function asObjectCopyFactory(input, copyFunction) {
3622
3613
  if ((typeof input === "undefined" ? "undefined" : _type_of$j(input)) === 'object') {
3623
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3624
3614
  return objectCopyFactory(input, copyFunction);
3625
3615
  } else {
3626
3616
  return asGetter(input);
@@ -3799,7 +3789,6 @@ function _type_of$i(obj) {
3799
3789
  * @returns The numeric value, or 0 for null/undefined
3800
3790
  */ function asNumber(input) {
3801
3791
  var value;
3802
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
3803
3792
  switch(typeof input === "undefined" ? "undefined" : _type_of$i(input)){
3804
3793
  case 'number':
3805
3794
  value = input;
@@ -4044,7 +4033,6 @@ function _type_of$h(obj) {
4044
4033
  }
4045
4034
  var fn = function fn(input) {
4046
4035
  var value;
4047
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
4048
4036
  switch(typeof input === "undefined" ? "undefined" : _type_of$h(input)){
4049
4037
  case 'number':
4050
4038
  value = input;
@@ -4355,9 +4343,7 @@ function reduceNumbersFn(reduceFn, emptyArrayValue) {
4355
4343
  }
4356
4344
  } else {
4357
4345
  var _ref, _input_start, _input_end;
4358
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
4359
4346
  start = (_ref = (_input_start = input.start) !== null && _input_start !== void 0 ? _input_start : input.minIndex) !== null && _ref !== void 0 ? _ref : 0;
4360
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
4361
4347
  end = (_input_end = input.end) !== null && _input_end !== void 0 ? _input_end : input.maxIndex;
4362
4348
  }
4363
4349
  if (end >= start) {
@@ -7795,11 +7781,9 @@ var AUTH_ROLE_CLAIMS_DEFAULT_EMPTY_VALUE = null;
7795
7781
  var _ref, _ref1;
7796
7782
  var defaultClaimValue = (_ref = objectHasKey(defaults, 'claimValue') ? defaults.claimValue : AUTH_ROLE_CLAIMS_DEFAULT_CLAIM_VALUE) !== null && _ref !== void 0 ? _ref : AUTH_ROLE_CLAIMS_DEFAULT_CLAIM_VALUE;
7797
7783
  var defaultEmptyValue = (_ref1 = objectHasKey(defaults, 'emptyValue') ? defaults.emptyValue : AUTH_ROLE_CLAIMS_DEFAULT_EMPTY_VALUE) !== null && _ref1 !== void 0 ? _ref1 : null;
7798
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7799
7784
  function isSimpleOptions(entry) {
7800
7785
  return 'roles' in entry;
7801
7786
  }
7802
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- generic config object needs cast for Object.entries
7803
7787
  var tuples = Object.entries(config).filter(function(x) {
7804
7788
  return x[1] != null;
7805
7789
  }) // skip any ignored/null values
@@ -8571,8 +8555,7 @@ function _unsupported_iterable_to_array$m(o, minLen) {
8571
8555
  * const isNotPositive = invertDecision(isPositive, true);
8572
8556
  * isNotPositive(5); // false
8573
8557
  * ```
8574
- */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- generic constraint needs `any` to match all DecisionFunction variants
8575
- var invertDecision = invertBooleanReturnFunction;
8558
+ */ var invertDecision = invertBooleanReturnFunction;
8576
8559
  /**
8577
8560
  * Normalizes a boolean value, a {@link DecisionFunction}, or undefined into a consistent {@link DecisionFunction}.
8578
8561
  *
@@ -9156,7 +9139,6 @@ var ALL_SLASH_PATH_FILE_TYPE_SEPARATORS_REGEX = /\.+/g;
9156
9139
  var targetPathPartsInput = asArray(path);
9157
9140
  var indexMatchingDecisionFunctions = [];
9158
9141
  targetPathPartsInput.forEach(function(part, _index) {
9159
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
9160
9142
  switch(typeof part === "undefined" ? "undefined" : _type_of$c(part)){
9161
9143
  case 'number':
9162
9144
  {
@@ -9202,7 +9184,6 @@ var ALL_SLASH_PATH_FILE_TYPE_SEPARATORS_REGEX = /\.+/g;
9202
9184
  targetPath: input
9203
9185
  };
9204
9186
  } else {
9205
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
9206
9187
  switch(typeof input === "undefined" ? "undefined" : _type_of$c(input)){
9207
9188
  case 'string':
9208
9189
  pathMatcherConfig = {
@@ -10058,7 +10039,6 @@ function partialServerError(messageOrError) {
10058
10039
  message: messageOrError
10059
10040
  };
10060
10041
  } else {
10061
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
10062
10042
  serverError = messageOrError !== null && messageOrError !== void 0 ? messageOrError : {};
10063
10043
  }
10064
10044
  return serverError;
@@ -11056,7 +11036,6 @@ function _unsupported_iterable_to_array$f(o, minLen) {
11056
11036
  throw new Error("Encountered unknown value ".concat(input, " in primativeKeyDencoder."));
11057
11037
  }
11058
11038
  }
11059
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- overloaded return type requires cast
11060
11039
  return value;
11061
11040
  }
11062
11041
  };
@@ -11103,7 +11082,6 @@ function _unsupported_iterable_to_array$f(o, minLen) {
11103
11082
  return dencoder(split);
11104
11083
  } else {
11105
11084
  var encoded = dencoder(input);
11106
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- overloaded return type requires cast
11107
11085
  return encoded.join(joiner);
11108
11086
  }
11109
11087
  };
@@ -12351,7 +12329,6 @@ function _unsupported_iterable_to_array$d(o, minLen) {
12351
12329
  */ function latLngBoundFromInput(input) {
12352
12330
  var bound;
12353
12331
  var first = firstValue(input);
12354
- // eslint-disable-next-line eqeqeq -- firstValue returns undefined for empty arrays despite type signature
12355
12332
  if (first != null) {
12356
12333
  if (isLatLngBound(first)) {
12357
12334
  bound = first;
@@ -13224,8 +13201,7 @@ var MINUTE_OF_DAY_MAXMIMUM = MINUTES_IN_DAY - 1;
13224
13201
  * A no-operation modifier that does nothing to the input. Useful as a default/fallback.
13225
13202
  *
13226
13203
  * @returns undefined (no mutation is performed)
13227
- */ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13228
- var NOOP_MODIFIER = function NOOP_MODIFIER() {
13204
+ */ var NOOP_MODIFIER = function NOOP_MODIFIER() {
13229
13205
  return undefined;
13230
13206
  };
13231
13207
  /**
@@ -13906,7 +13882,6 @@ function _object_spread$7(target) {
13906
13882
  * @param b - Second array (or single value) of partial objects
13907
13883
  * @returns 2D array where result[i][j] is `{ ...a[i], ...b[j] }`
13908
13884
  */ function objectMergeMatrix(a, b) {
13909
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
13910
13885
  if (a && b) {
13911
13886
  var aNorm = convertToArray(a);
13912
13887
  var bNorm = convertToArray(b);
@@ -13916,12 +13891,10 @@ function _object_spread$7(target) {
13916
13891
  });
13917
13892
  });
13918
13893
  return results;
13919
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
13920
13894
  } else if (a) {
13921
13895
  return [
13922
13896
  convertToArray(a)
13923
13897
  ];
13924
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
13925
13898
  } else if (b) {
13926
13899
  return [
13927
13900
  convertToArray(b)
@@ -15432,7 +15405,6 @@ function _performAsyncTask(_0, _1) {
15432
15405
  config = _arguments.length > 2 && _arguments[2] !== void 0 ? _arguments[2] : {};
15433
15406
  inputThrowError = config.throwError, inputRetriesAllowed = config.retriesAllowed, _config_retryWait = config.retryWait, retryWait = _config_retryWait === void 0 ? 200 : _config_retryWait, beforeRetry = config.beforeRetry;
15434
15407
  throwError = inputThrowError !== null && inputThrowError !== void 0 ? inputThrowError : true; // throw errors by default
15435
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
15436
15408
  retriesAllowed = inputRetriesAllowed || 0;
15437
15409
  return [
15438
15410
  2,
@@ -15519,46 +15491,28 @@ function _performAsyncTask(_0, _1) {
15519
15491
  return _async_to_generator$4(function() {
15520
15492
  var promiseRef;
15521
15493
  return _ts_generator$4(this, function(_state) {
15522
- switch(_state.label){
15523
- case 0:
15524
- if (!isOutOfTasks) return [
15525
- 3,
15526
- 1
15527
- ];
15528
- return [
15529
- 2
15530
- ];
15531
- case 1:
15532
- promiseRef = promiseReference();
15533
- if (!isFulfillingTask) return [
15534
- 3,
15535
- 3
15536
- ];
15494
+ if (isOutOfTasks) {
15495
+ return [
15496
+ 2
15497
+ ];
15498
+ } else {
15499
+ promiseRef = promiseReference();
15500
+ if (isFulfillingTask) {
15537
15501
  requestTasksQueue.push([
15538
15502
  parallelIndex,
15539
15503
  promiseRef
15540
15504
  ]);
15541
- return [
15542
- 4,
15543
- promiseRef.promise
15544
- ];
15545
- case 2:
15546
- return [
15547
- 2,
15548
- _state.sent()
15549
- ];
15550
- case 3:
15551
- void fulfillRequestMoreTasks(parallelIndex, promiseRef);
15552
- _state.label = 4;
15553
- case 4:
15554
15505
  return [
15555
15506
  2,
15556
15507
  promiseRef.promise
15557
15508
  ];
15558
- case 5:
15559
- return [
15560
- 2
15561
- ];
15509
+ } else {
15510
+ void fulfillRequestMoreTasks(parallelIndex, promiseRef);
15511
+ }
15512
+ return [
15513
+ 2,
15514
+ promiseRef.promise
15515
+ ];
15562
15516
  }
15563
15517
  });
15564
15518
  })();
@@ -15643,7 +15597,6 @@ function _performAsyncTask(_0, _1) {
15643
15597
  // un-reserve the key from each parallel task
15644
15598
  currentParellelTaskKeys.delete(key);
15645
15599
  var waitingForKey = waitingConcurrentTasks.get(key);
15646
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- intentional infinite loop with break
15647
15600
  while(true){
15648
15601
  var nextWaitingTask = waitingForKey.shift(); // take from the front to retain unique task order
15649
15602
  if (nextWaitingTask) {
@@ -15794,9 +15747,7 @@ function _performAsyncTask(_0, _1) {
15794
15747
  * Creates a default non-concurrent task key factory that generates unique incrementing number strings.
15795
15748
  *
15796
15749
  * @returns A {@link StringFactory} that produces unique keys for identifying non-concurrent tasks.
15797
- */ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15798
- function makeDefaultNonConcurrentTaskKeyFactory() {
15799
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- matching return type
15750
+ */ function makeDefaultNonConcurrentTaskKeyFactory() {
15800
15751
  return stringFactoryFromFactory(incrementingNumberFactory(), function(x) {
15801
15752
  return x.toString();
15802
15753
  });
@@ -17059,9 +17010,7 @@ function _compareObjects(a, b, pojoFilter) {
17059
17010
  return isEqualDate(a, b);
17060
17011
  }
17061
17012
  // check object comparison via keys
17062
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
17063
17013
  var aObject = a;
17064
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
17065
17014
  var bObject = b;
17066
17015
  var aKeys = Object.keys(aObject);
17067
17016
  var bKeys = Object.keys(bObject);
@@ -17258,7 +17207,6 @@ function _unsupported_iterable_to_array$6(o, minLen) {
17258
17207
  * @returns A function that remaps keys on any input object
17259
17208
  */ function mapObjectKeysFunction(mapKeyFn) {
17260
17209
  return function(object) {
17261
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
17262
17210
  var target = {};
17263
17211
  Object.entries(object).forEach(function(param) {
17264
17212
  var _param = _sliced_to_array$4(param, 2), key = _param[0], value = _param[1];
@@ -18185,7 +18133,6 @@ function handlerFactory(readKey, options) {
18185
18133
  var handler = (_ref = key != null ? map.get(key) : undefined) !== null && _ref !== void 0 ? _ref : catchAll;
18186
18134
  var handled;
18187
18135
  if (handler) {
18188
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- defaultResultValue is needed as fallback when handler returns undefined
18189
18136
  handled = Promise.resolve(handler(value)).then(function(x) {
18190
18137
  return x !== null && x !== void 0 ? x : defaultResultValue;
18191
18138
  });
package/index.esm.js CHANGED
@@ -1343,13 +1343,11 @@ function _unsupported_iterable_to_array$z(o, minLen) {
1343
1343
  */ function invertBooleanReturnFunction(decisionFn) {
1344
1344
  var invert = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
1345
1345
  if (invert) {
1346
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1347
1346
  return function() {
1348
1347
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
1349
1348
  args[_key] = arguments[_key];
1350
1349
  }
1351
1350
  var _decisionFn;
1352
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1353
1351
  var result = (_decisionFn = decisionFn).call.apply(_decisionFn, [
1354
1352
  undefined
1355
1353
  ].concat(_to_consumable_array$o(args)));
@@ -1519,7 +1517,6 @@ function _type_of$l(obj) {
1519
1517
  * @param value - the value to check
1520
1518
  * @returns `true` if the value is a non-empty string or is `true`
1521
1519
  */ function isStringOrTrue(value) {
1522
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
1523
1520
  return Boolean(value || value !== '');
1524
1521
  }
1525
1522
  /**
@@ -2119,7 +2116,6 @@ function makeModelMap(input, read) {
2119
2116
  var map = new Map();
2120
2117
  input.forEach(function(x) {
2121
2118
  var _read;
2122
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
2123
2119
  var keys = (_read = read(x)) !== null && _read !== void 0 ? _read : [];
2124
2120
  keys.forEach(function(key) {
2125
2121
  return map.set(key, x);
@@ -2142,7 +2138,6 @@ function makeModelMap(input, read) {
2142
2138
  */ function useModelOrKey(input, param) {
2143
2139
  var useModel = param.useModel, useKey = param.useKey, _param_required = param.required, required = _param_required === void 0 ? false : _param_required;
2144
2140
  var result;
2145
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
2146
2141
  if (input != null) {
2147
2142
  if (isModelKey(input)) {
2148
2143
  result = useKey(input);
@@ -2180,7 +2175,6 @@ function makeModelMap(input, read) {
2180
2175
  function readModelKey(input) {
2181
2176
  var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref_required = _ref.required, required = _ref_required === void 0 ? false : _ref_required, _ref_read = _ref.read, read = _ref_read === void 0 ? readUniqueModelKey : _ref_read;
2182
2177
  var key;
2183
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
2184
2178
  switch(typeof input === "undefined" ? "undefined" : _type_of$k(input)){
2185
2179
  case 'string':
2186
2180
  key = input;
@@ -2218,7 +2212,6 @@ function readModelKey(input) {
2218
2212
  * @param input - A model object or a key string
2219
2213
  * @returns `true` if the input is a string key
2220
2214
  */ function isModelKey(input) {
2221
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
2222
2215
  switch(typeof input === "undefined" ? "undefined" : _type_of$k(input)){
2223
2216
  case 'string':
2224
2217
  return true;
@@ -3299,7 +3292,6 @@ function _unsupported_iterable_to_array$s(o, minLen) {
3299
3292
  var map = new Map();
3300
3293
  values.forEach(function(x) {
3301
3294
  var _read;
3302
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
3303
3295
  var keys = (_read = read(x)) !== null && _read !== void 0 ? _read : [];
3304
3296
  keys.forEach(function(key) {
3305
3297
  return map.set(key, x);
@@ -3528,8 +3520,7 @@ function _unsupported_iterable_to_array$s(o, minLen) {
3528
3520
  *
3529
3521
  * @param obj - The value to check.
3530
3522
  * @returns Whether the value is a function with a constructor.
3531
- */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- type guard accepting any value
3532
- function isObjectWithConstructor(obj) {
3523
+ */ function isObjectWithConstructor(obj) {
3533
3524
  return typeof obj === 'function' && !!obj.prototype && !!obj.constructor && !!obj.prototype.constructor.name;
3534
3525
  }
3535
3526
  /**
@@ -3618,7 +3609,6 @@ function getValueFromGetter(input, args) {
3618
3609
  * @returns An ObjectCopyFactory for the input
3619
3610
  */ function asObjectCopyFactory(input, copyFunction) {
3620
3611
  if ((typeof input === "undefined" ? "undefined" : _type_of$j(input)) === 'object') {
3621
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3622
3612
  return objectCopyFactory(input, copyFunction);
3623
3613
  } else {
3624
3614
  return asGetter(input);
@@ -3797,7 +3787,6 @@ function _type_of$i(obj) {
3797
3787
  * @returns The numeric value, or 0 for null/undefined
3798
3788
  */ function asNumber(input) {
3799
3789
  var value;
3800
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
3801
3790
  switch(typeof input === "undefined" ? "undefined" : _type_of$i(input)){
3802
3791
  case 'number':
3803
3792
  value = input;
@@ -4042,7 +4031,6 @@ function _type_of$h(obj) {
4042
4031
  }
4043
4032
  var fn = function fn(input) {
4044
4033
  var value;
4045
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
4046
4034
  switch(typeof input === "undefined" ? "undefined" : _type_of$h(input)){
4047
4035
  case 'number':
4048
4036
  value = input;
@@ -4353,9 +4341,7 @@ function reduceNumbersFn(reduceFn, emptyArrayValue) {
4353
4341
  }
4354
4342
  } else {
4355
4343
  var _ref, _input_start, _input_end;
4356
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
4357
4344
  start = (_ref = (_input_start = input.start) !== null && _input_start !== void 0 ? _input_start : input.minIndex) !== null && _ref !== void 0 ? _ref : 0;
4358
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
4359
4345
  end = (_input_end = input.end) !== null && _input_end !== void 0 ? _input_end : input.maxIndex;
4360
4346
  }
4361
4347
  if (end >= start) {
@@ -7793,11 +7779,9 @@ var AUTH_ROLE_CLAIMS_DEFAULT_EMPTY_VALUE = null;
7793
7779
  var _ref, _ref1;
7794
7780
  var defaultClaimValue = (_ref = objectHasKey(defaults, 'claimValue') ? defaults.claimValue : AUTH_ROLE_CLAIMS_DEFAULT_CLAIM_VALUE) !== null && _ref !== void 0 ? _ref : AUTH_ROLE_CLAIMS_DEFAULT_CLAIM_VALUE;
7795
7781
  var defaultEmptyValue = (_ref1 = objectHasKey(defaults, 'emptyValue') ? defaults.emptyValue : AUTH_ROLE_CLAIMS_DEFAULT_EMPTY_VALUE) !== null && _ref1 !== void 0 ? _ref1 : null;
7796
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7797
7782
  function isSimpleOptions(entry) {
7798
7783
  return 'roles' in entry;
7799
7784
  }
7800
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- generic config object needs cast for Object.entries
7801
7785
  var tuples = Object.entries(config).filter(function(x) {
7802
7786
  return x[1] != null;
7803
7787
  }) // skip any ignored/null values
@@ -8569,8 +8553,7 @@ function _unsupported_iterable_to_array$m(o, minLen) {
8569
8553
  * const isNotPositive = invertDecision(isPositive, true);
8570
8554
  * isNotPositive(5); // false
8571
8555
  * ```
8572
- */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- generic constraint needs `any` to match all DecisionFunction variants
8573
- var invertDecision = invertBooleanReturnFunction;
8556
+ */ var invertDecision = invertBooleanReturnFunction;
8574
8557
  /**
8575
8558
  * Normalizes a boolean value, a {@link DecisionFunction}, or undefined into a consistent {@link DecisionFunction}.
8576
8559
  *
@@ -9154,7 +9137,6 @@ var ALL_SLASH_PATH_FILE_TYPE_SEPARATORS_REGEX = /\.+/g;
9154
9137
  var targetPathPartsInput = asArray(path);
9155
9138
  var indexMatchingDecisionFunctions = [];
9156
9139
  targetPathPartsInput.forEach(function(part, _index) {
9157
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
9158
9140
  switch(typeof part === "undefined" ? "undefined" : _type_of$c(part)){
9159
9141
  case 'number':
9160
9142
  {
@@ -9200,7 +9182,6 @@ var ALL_SLASH_PATH_FILE_TYPE_SEPARATORS_REGEX = /\.+/g;
9200
9182
  targetPath: input
9201
9183
  };
9202
9184
  } else {
9203
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
9204
9185
  switch(typeof input === "undefined" ? "undefined" : _type_of$c(input)){
9205
9186
  case 'string':
9206
9187
  pathMatcherConfig = {
@@ -10056,7 +10037,6 @@ function partialServerError(messageOrError) {
10056
10037
  message: messageOrError
10057
10038
  };
10058
10039
  } else {
10059
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
10060
10040
  serverError = messageOrError !== null && messageOrError !== void 0 ? messageOrError : {};
10061
10041
  }
10062
10042
  return serverError;
@@ -11054,7 +11034,6 @@ function _unsupported_iterable_to_array$f(o, minLen) {
11054
11034
  throw new Error("Encountered unknown value ".concat(input, " in primativeKeyDencoder."));
11055
11035
  }
11056
11036
  }
11057
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- overloaded return type requires cast
11058
11037
  return value;
11059
11038
  }
11060
11039
  };
@@ -11101,7 +11080,6 @@ function _unsupported_iterable_to_array$f(o, minLen) {
11101
11080
  return dencoder(split);
11102
11081
  } else {
11103
11082
  var encoded = dencoder(input);
11104
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- overloaded return type requires cast
11105
11083
  return encoded.join(joiner);
11106
11084
  }
11107
11085
  };
@@ -12349,7 +12327,6 @@ function _unsupported_iterable_to_array$d(o, minLen) {
12349
12327
  */ function latLngBoundFromInput(input) {
12350
12328
  var bound;
12351
12329
  var first = firstValue(input);
12352
- // eslint-disable-next-line eqeqeq -- firstValue returns undefined for empty arrays despite type signature
12353
12330
  if (first != null) {
12354
12331
  if (isLatLngBound(first)) {
12355
12332
  bound = first;
@@ -13222,8 +13199,7 @@ var MINUTE_OF_DAY_MAXMIMUM = MINUTES_IN_DAY - 1;
13222
13199
  * A no-operation modifier that does nothing to the input. Useful as a default/fallback.
13223
13200
  *
13224
13201
  * @returns undefined (no mutation is performed)
13225
- */ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13226
- var NOOP_MODIFIER = function NOOP_MODIFIER() {
13202
+ */ var NOOP_MODIFIER = function NOOP_MODIFIER() {
13227
13203
  return undefined;
13228
13204
  };
13229
13205
  /**
@@ -13904,7 +13880,6 @@ function _object_spread$7(target) {
13904
13880
  * @param b - Second array (or single value) of partial objects
13905
13881
  * @returns 2D array where result[i][j] is `{ ...a[i], ...b[j] }`
13906
13882
  */ function objectMergeMatrix(a, b) {
13907
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
13908
13883
  if (a && b) {
13909
13884
  var aNorm = convertToArray(a);
13910
13885
  var bNorm = convertToArray(b);
@@ -13914,12 +13889,10 @@ function _object_spread$7(target) {
13914
13889
  });
13915
13890
  });
13916
13891
  return results;
13917
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
13918
13892
  } else if (a) {
13919
13893
  return [
13920
13894
  convertToArray(a)
13921
13895
  ];
13922
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
13923
13896
  } else if (b) {
13924
13897
  return [
13925
13898
  convertToArray(b)
@@ -15430,7 +15403,6 @@ function _performAsyncTask(_0, _1) {
15430
15403
  config = _arguments.length > 2 && _arguments[2] !== void 0 ? _arguments[2] : {};
15431
15404
  inputThrowError = config.throwError, inputRetriesAllowed = config.retriesAllowed, _config_retryWait = config.retryWait, retryWait = _config_retryWait === void 0 ? 200 : _config_retryWait, beforeRetry = config.beforeRetry;
15432
15405
  throwError = inputThrowError !== null && inputThrowError !== void 0 ? inputThrowError : true; // throw errors by default
15433
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
15434
15406
  retriesAllowed = inputRetriesAllowed || 0;
15435
15407
  return [
15436
15408
  2,
@@ -15517,46 +15489,28 @@ function _performAsyncTask(_0, _1) {
15517
15489
  return _async_to_generator$4(function() {
15518
15490
  var promiseRef;
15519
15491
  return _ts_generator$4(this, function(_state) {
15520
- switch(_state.label){
15521
- case 0:
15522
- if (!isOutOfTasks) return [
15523
- 3,
15524
- 1
15525
- ];
15526
- return [
15527
- 2
15528
- ];
15529
- case 1:
15530
- promiseRef = promiseReference();
15531
- if (!isFulfillingTask) return [
15532
- 3,
15533
- 3
15534
- ];
15492
+ if (isOutOfTasks) {
15493
+ return [
15494
+ 2
15495
+ ];
15496
+ } else {
15497
+ promiseRef = promiseReference();
15498
+ if (isFulfillingTask) {
15535
15499
  requestTasksQueue.push([
15536
15500
  parallelIndex,
15537
15501
  promiseRef
15538
15502
  ]);
15539
- return [
15540
- 4,
15541
- promiseRef.promise
15542
- ];
15543
- case 2:
15544
- return [
15545
- 2,
15546
- _state.sent()
15547
- ];
15548
- case 3:
15549
- void fulfillRequestMoreTasks(parallelIndex, promiseRef);
15550
- _state.label = 4;
15551
- case 4:
15552
15503
  return [
15553
15504
  2,
15554
15505
  promiseRef.promise
15555
15506
  ];
15556
- case 5:
15557
- return [
15558
- 2
15559
- ];
15507
+ } else {
15508
+ void fulfillRequestMoreTasks(parallelIndex, promiseRef);
15509
+ }
15510
+ return [
15511
+ 2,
15512
+ promiseRef.promise
15513
+ ];
15560
15514
  }
15561
15515
  });
15562
15516
  })();
@@ -15641,7 +15595,6 @@ function _performAsyncTask(_0, _1) {
15641
15595
  // un-reserve the key from each parallel task
15642
15596
  currentParellelTaskKeys.delete(key);
15643
15597
  var waitingForKey = waitingConcurrentTasks.get(key);
15644
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- intentional infinite loop with break
15645
15598
  while(true){
15646
15599
  var nextWaitingTask = waitingForKey.shift(); // take from the front to retain unique task order
15647
15600
  if (nextWaitingTask) {
@@ -15792,9 +15745,7 @@ function _performAsyncTask(_0, _1) {
15792
15745
  * Creates a default non-concurrent task key factory that generates unique incrementing number strings.
15793
15746
  *
15794
15747
  * @returns A {@link StringFactory} that produces unique keys for identifying non-concurrent tasks.
15795
- */ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15796
- function makeDefaultNonConcurrentTaskKeyFactory() {
15797
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- matching return type
15748
+ */ function makeDefaultNonConcurrentTaskKeyFactory() {
15798
15749
  return stringFactoryFromFactory(incrementingNumberFactory(), function(x) {
15799
15750
  return x.toString();
15800
15751
  });
@@ -17057,9 +17008,7 @@ function _compareObjects(a, b, pojoFilter) {
17057
17008
  return isEqualDate(a, b);
17058
17009
  }
17059
17010
  // check object comparison via keys
17060
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
17061
17011
  var aObject = a;
17062
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
17063
17012
  var bObject = b;
17064
17013
  var aKeys = Object.keys(aObject);
17065
17014
  var bKeys = Object.keys(bObject);
@@ -17256,7 +17205,6 @@ function _unsupported_iterable_to_array$6(o, minLen) {
17256
17205
  * @returns A function that remaps keys on any input object
17257
17206
  */ function mapObjectKeysFunction(mapKeyFn) {
17258
17207
  return function(object) {
17259
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
17260
17208
  var target = {};
17261
17209
  Object.entries(object).forEach(function(param) {
17262
17210
  var _param = _sliced_to_array$4(param, 2), key = _param[0], value = _param[1];
@@ -18183,7 +18131,6 @@ function handlerFactory(readKey, options) {
18183
18131
  var handler = (_ref = key != null ? map.get(key) : undefined) !== null && _ref !== void 0 ? _ref : catchAll;
18184
18132
  var handled;
18185
18133
  if (handler) {
18186
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- defaultResultValue is needed as fallback when handler returns undefined
18187
18134
  handled = Promise.resolve(handler(value)).then(function(x) {
18188
18135
  return x !== null && x !== void 0 ? x : defaultResultValue;
18189
18136
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/util",
3
- "version": "13.4.1",
3
+ "version": "13.4.2",
4
4
  "exports": {
5
5
  "./test": {
6
6
  "module": "./test/index.esm.js",
@@ -13,6 +13,9 @@ export type JsonSerializableObject = Record<PrimativeKey, any>;
13
13
  * String key of an object.
14
14
  */
15
15
  export type ObjectKey = string;
16
+ /**
17
+ * An object with no keys.
18
+ */
16
19
  export type EmptyObject = Record<string, never>;
17
20
  /**
18
21
  * Checks whether the object has no own enumerable keys.
package/test/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@dereekb/util/test",
3
- "version": "13.4.1",
3
+ "version": "13.4.2",
4
4
  "peerDependencies": {
5
- "@dereekb/util": "13.4.1",
5
+ "@dereekb/util": "13.4.2",
6
6
  "make-error": "^1.3.0"
7
7
  },
8
8
  "exports": {