zeed 0.8.1 → 0.8.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,4 +1,5 @@
1
- "use strict";
1
+ 'use strict';
2
+
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -889,8 +890,7 @@ function Uint8ArrayToJson(data) {
889
890
  }
890
891
  __name(Uint8ArrayToJson, "Uint8ArrayToJson");
891
892
  function Uint8ArrayToHexDump(buffer, blockSize) {
892
- if (typeof buffer === "string") {
893
- } else if (buffer instanceof ArrayBuffer && buffer.byteLength !== void 0) {
893
+ if (typeof buffer === "string") ; else if (buffer instanceof ArrayBuffer && buffer.byteLength !== void 0) {
894
894
  buffer = String.fromCharCode.apply(
895
895
  String,
896
896
  [].slice.call(new Uint8Array(buffer))
@@ -1007,8 +1007,6 @@ __name(decrypt, "decrypt");
1007
1007
 
1008
1008
  // src/common/csv.ts
1009
1009
  var separator = ",";
1010
- var preventCast = false;
1011
- var ignoreNullOrUndefined = true;
1012
1010
  function filterFloat(value) {
1013
1011
  if (/^([-+])?([0-9]+(\.[0-9]+)?|Infinity)$/.test(value)) {
1014
1012
  return Number(value);
@@ -1017,12 +1015,9 @@ function filterFloat(value) {
1017
1015
  }
1018
1016
  __name(filterFloat, "filterFloat");
1019
1017
  function escape2(field) {
1020
- if (ignoreNullOrUndefined && field == void 0) {
1018
+ if (field == void 0) {
1021
1019
  return "";
1022
1020
  }
1023
- if (preventCast) {
1024
- return '="' + String(field).replace(/"/g, '""') + '"';
1025
- }
1026
1021
  if (!isNaN(filterFloat(field)) && isFinite(field)) {
1027
1022
  return parseFloat(field);
1028
1023
  }
@@ -3170,10 +3165,7 @@ var SerialQueue = class extends Emitter {
3170
3165
  }
3171
3166
  };
3172
3167
  __name(SerialQueue, "SerialQueue");
3173
-
3174
- // src/common/exec/throttle-debounce.ts
3175
- var DEBUG = false;
3176
- var log6 = DEBUG ? Logger("zeed:throttle") : () => {
3168
+ var log6 = () => {
3177
3169
  };
3178
3170
  function throttle(callback, opt = {}) {
3179
3171
  const { delay = 100, trailing = true, leading = true } = opt;
@@ -3206,10 +3198,8 @@ function throttle(callback, opt = {}) {
3206
3198
  __name(exec, "exec");
3207
3199
  trailingExec = exec;
3208
3200
  if (elapsed > delay || !timeoutID) {
3209
- DEBUG && log6("elapsed", debugElapsed());
3210
3201
  if (leading) {
3211
3202
  if (elapsed > delay) {
3212
- DEBUG && log6("\u{1F680} leading", debugElapsed());
3213
3203
  exec();
3214
3204
  } else {
3215
3205
  ++visited;
@@ -3220,16 +3210,13 @@ function throttle(callback, opt = {}) {
3220
3210
  clearExistingTimeout();
3221
3211
  checkpoint = now;
3222
3212
  timeoutID = setTimeout(() => {
3223
- DEBUG && log6("\u23F1 reached timeout", debugElapsed());
3224
3213
  timeoutID = 0;
3225
3214
  if (trailing && (!leading || visited > 0)) {
3226
- DEBUG && log6("\u{1F680} trailing", debugElapsed());
3227
3215
  trailingExec == null ? void 0 : trailingExec();
3228
3216
  }
3229
3217
  }, timeout2);
3230
3218
  } else {
3231
3219
  ++visited;
3232
- DEBUG && log6("visited", debugElapsed());
3233
3220
  }
3234
3221
  }
3235
3222
  __name(wrapper, "wrapper");
@@ -3827,7 +3814,7 @@ function useExitHandler(handler) {
3827
3814
  __name(useExitHandler, "useExitHandler");
3828
3815
 
3829
3816
  // src/common/storage/memstorage.ts
3830
- var log8 = Logger("zeed:memstorage");
3817
+ Logger("zeed:memstorage");
3831
3818
  var MemStorage = class {
3832
3819
  constructor(opt = {}) {
3833
3820
  this.store = {};
@@ -4394,267 +4381,4 @@ function LoggerBrowserClassicHandler(level, opt = {}) {
4394
4381
  };
4395
4382
  }
4396
4383
  __name(LoggerBrowserClassicHandler, "LoggerBrowserClassicHandler");
4397
- // Annotate the CommonJS export names for ESM import in node:
4398
- 0 && (module.exports = {
4399
- Channel,
4400
- CryptoEncoder,
4401
- Currency,
4402
- DAY_MS,
4403
- Day,
4404
- Emitter,
4405
- JsonEncoder,
4406
- LocalChannel,
4407
- LocalStorage,
4408
- LogLevel,
4409
- LogLevelAlias,
4410
- Logger,
4411
- LoggerBrowserClassicHandler,
4412
- LoggerBrowserHandler,
4413
- LoggerBrowserSetupDebugFactory,
4414
- LoggerConsoleHandler,
4415
- LoggerContext,
4416
- LoggerMemoryHandler,
4417
- MemStorage,
4418
- NoopEncoder,
4419
- PoolTaskIdConflictResolution,
4420
- PoolTaskState,
4421
- PubSub,
4422
- SerialQueue,
4423
- Uint8ArrayToHexDump,
4424
- Uint8ArrayToJson,
4425
- Uint8ArrayToString,
4426
- XRX,
4427
- _decodeUtf8Polyfill,
4428
- _encodeUtf8Polyfill,
4429
- activateConsoleDebug,
4430
- arrayAvg,
4431
- arrayBatches,
4432
- arrayEmptyInPlace,
4433
- arrayFilterInPlace,
4434
- arrayFlatten,
4435
- arrayIntersection,
4436
- arrayIsEqual,
4437
- arrayMax,
4438
- arrayMin,
4439
- arrayMinus,
4440
- arrayRandomElement,
4441
- arrayRemoveElement,
4442
- arraySetElement,
4443
- arrayShuffle,
4444
- arrayShuffleForce,
4445
- arrayShuffleInPlace,
4446
- arraySorted,
4447
- arraySortedNumbers,
4448
- arraySum,
4449
- arraySymmetricDifference,
4450
- arrayToggleInPlace,
4451
- arrayUnion,
4452
- arrayUnique,
4453
- avg,
4454
- between,
4455
- cloneJsonObject,
4456
- cloneObject,
4457
- cmp,
4458
- composeOrderby,
4459
- createArray,
4460
- createLocalChannelPair,
4461
- createPromise,
4462
- createPromiseProxy,
4463
- csv,
4464
- currency,
4465
- dateStringToDays,
4466
- day,
4467
- dayDay,
4468
- dayDiff,
4469
- dayFromAny,
4470
- dayFromDate,
4471
- dayFromDateGMT,
4472
- dayFromParts,
4473
- dayFromString,
4474
- dayFromTimestamp,
4475
- dayFromToday,
4476
- dayMonth,
4477
- dayMonthStart,
4478
- dayOffset,
4479
- dayToDate,
4480
- dayToDateGMT,
4481
- dayToParts,
4482
- dayToString,
4483
- dayToTimestamp,
4484
- dayYear,
4485
- dayYearStart,
4486
- debounce,
4487
- decimal,
4488
- decimalCentsPart,
4489
- decimalFromCents,
4490
- decimalToCents,
4491
- decodeBase16,
4492
- decodeBase32,
4493
- decodeBase58,
4494
- decodeBase62,
4495
- decodeBase64,
4496
- decrypt,
4497
- deepEqual,
4498
- deepMerge,
4499
- deriveKeyPbkdf2,
4500
- detect,
4501
- digest,
4502
- empty,
4503
- encodeBase16,
4504
- encodeBase32,
4505
- encodeBase58,
4506
- encodeBase62,
4507
- encodeBase64,
4508
- encodeQuery,
4509
- encrypt,
4510
- endSortWeight,
4511
- ensureKey,
4512
- ensureKeyAsync,
4513
- equalBinary,
4514
- escapeHTML,
4515
- escapeRegExp,
4516
- fetchBasic,
4517
- fetchJson,
4518
- fetchOptionsBasicAuth,
4519
- fetchOptionsFormURLEncoded,
4520
- fetchOptionsJson,
4521
- fetchText,
4522
- fixBrokenUth8String,
4523
- forEachDay,
4524
- forTimes,
4525
- formatMessages,
4526
- formatMilliseconds,
4527
- fromBase64,
4528
- fromCamelCase,
4529
- getGlobal,
4530
- getGlobalContext,
4531
- getGlobalEmitter,
4532
- getNamespaceFilterString,
4533
- getNavigator,
4534
- getSecureRandom,
4535
- getSecureRandomIfPossible,
4536
- getTimestamp,
4537
- getWindow,
4538
- gravatarURLByEmail,
4539
- immediate,
4540
- isArray,
4541
- isBoolean,
4542
- isBrowser,
4543
- isEven,
4544
- isHalf,
4545
- isInteger,
4546
- isLocalHost,
4547
- isNullOrUndefined,
4548
- isNumber,
4549
- isObject,
4550
- isPrime,
4551
- isPrimeRX,
4552
- isPrimitive,
4553
- isPromise,
4554
- isRecord,
4555
- isSafeInteger,
4556
- isString,
4557
- isTimeout,
4558
- isUint8Array,
4559
- joinToUint8Array,
4560
- jsonStringify,
4561
- jsonToUint8Array,
4562
- last,
4563
- lazyListener,
4564
- linkifyPlainText,
4565
- memoize,
4566
- messages,
4567
- moveSortWeight,
4568
- parseBasicAuth,
4569
- parseDate,
4570
- parseLogLevel,
4571
- parseOrderby,
4572
- parseQuery,
4573
- platform,
4574
- promisify,
4575
- qid,
4576
- randomBoolean,
4577
- randomFloat,
4578
- randomInt,
4579
- randomUint8Array,
4580
- regExpEscape,
4581
- regExpString,
4582
- renderMessages,
4583
- roundDown,
4584
- roundHalfAwayFromZero,
4585
- roundHalfDown,
4586
- roundHalfEven,
4587
- roundHalfOdd,
4588
- roundHalfTowardsZero,
4589
- roundHalfUp,
4590
- roundUp,
4591
- selectColor,
4592
- size,
4593
- sleep,
4594
- sortedItems,
4595
- sortedOrderby,
4596
- startSortWeight,
4597
- stringToBoolean,
4598
- stringToFloat,
4599
- stringToInteger,
4600
- stringToUInt8Array,
4601
- suid,
4602
- suidBytes,
4603
- suidBytesDate,
4604
- suidDate,
4605
- sum,
4606
- supportsColors,
4607
- throttle,
4608
- timeout,
4609
- timeoutReached,
4610
- timoutError,
4611
- toBase64,
4612
- toBase64Url,
4613
- toBool,
4614
- toCamelCase,
4615
- toCapitalize,
4616
- toCapitalizeWords,
4617
- toFloat,
4618
- toHex,
4619
- toHumanReadableUrl,
4620
- toInt,
4621
- toString,
4622
- toUint8Array,
4623
- toValidFilename,
4624
- today,
4625
- tryTimeout,
4626
- uname,
4627
- unescapeHTML,
4628
- urlBase64ToUint8Array,
4629
- useAsyncMutex,
4630
- useBase,
4631
- useDefer,
4632
- useDispose,
4633
- useDisposer,
4634
- useEventListener,
4635
- useExitHandler,
4636
- useInterval,
4637
- useLevelFilter,
4638
- useMessageHub,
4639
- useMutex,
4640
- useNamespaceFilter,
4641
- usePool,
4642
- usePubSub,
4643
- useRPC,
4644
- useTimeout,
4645
- uuid,
4646
- uuid32Decode,
4647
- uuid32Encode,
4648
- uuid32bit,
4649
- uuidB32,
4650
- uuidBytes,
4651
- uuidDecode,
4652
- uuidEncode,
4653
- uuidv4,
4654
- valueToBoolean,
4655
- valueToFloat,
4656
- valueToInteger,
4657
- valueToString,
4658
- waitOn
4659
- });
4660
4384
  //# sourceMappingURL=index.browser.cjs.map