@kikiutils/shared 15.1.1 → 17.0.0

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.
Files changed (79) hide show
  1. package/README.md +1 -1
  2. package/dist/buffer.d.ts +0 -1
  3. package/dist/buffer.d.ts.map +1 -1
  4. package/dist/classes/path.d.ts +0 -1
  5. package/dist/classes/path.d.ts.map +1 -1
  6. package/dist/classes/path.js.map +1 -1
  7. package/dist/classes/precision-number.d.ts +0 -1
  8. package/dist/classes/precision-number.d.ts.map +1 -1
  9. package/dist/classes/precision-number.js.map +1 -1
  10. package/dist/classes/ssh-client.d.ts +4 -7
  11. package/dist/classes/ssh-client.d.ts.map +1 -1
  12. package/dist/classes/ssh-client.js.map +1 -1
  13. package/dist/clipboard.d.ts.map +1 -1
  14. package/dist/consola.d.ts +2 -4
  15. package/dist/consola.d.ts.map +1 -1
  16. package/dist/crypto-hash.d.ts +11 -12
  17. package/dist/crypto-hash.d.ts.map +1 -1
  18. package/dist/crypto-hash.js +19 -15
  19. package/dist/crypto-hash.js.map +1 -1
  20. package/dist/datetime.d.ts +0 -1
  21. package/dist/datetime.d.ts.map +1 -1
  22. package/dist/element-plus.d.ts +0 -1
  23. package/dist/element-plus.d.ts.map +1 -1
  24. package/dist/enum.d.ts.map +1 -1
  25. package/dist/enum.js.map +1 -1
  26. package/dist/env.d.ts.map +1 -1
  27. package/dist/event-awaiter.d.ts.map +1 -1
  28. package/dist/general.d.ts.map +1 -1
  29. package/dist/hash.d.ts.map +1 -1
  30. package/dist/math.d.ts +0 -1
  31. package/dist/math.d.ts.map +1 -1
  32. package/dist/math.js.map +1 -1
  33. package/dist/number.d.ts +0 -1
  34. package/dist/number.d.ts.map +1 -1
  35. package/dist/object.d.ts.map +1 -1
  36. package/dist/object.js.map +1 -1
  37. package/dist/pino.d.ts +2 -4
  38. package/dist/pino.d.ts.map +1 -1
  39. package/dist/pino.js +10 -5
  40. package/dist/pino.js.map +1 -1
  41. package/dist/random.d.ts.map +1 -1
  42. package/dist/storages/lru/keyed-store.d.ts +0 -1
  43. package/dist/storages/lru/keyed-store.d.ts.map +1 -1
  44. package/dist/storages/redis/keyed-store.d.ts +2 -3
  45. package/dist/storages/redis/keyed-store.d.ts.map +1 -1
  46. package/dist/storages/redis/msgpack.d.ts +0 -1
  47. package/dist/storages/redis/msgpack.d.ts.map +1 -1
  48. package/dist/storages/redis/types.d.ts +2 -4
  49. package/dist/storages/redis/types.d.ts.map +1 -1
  50. package/dist/string.d.ts.map +1 -1
  51. package/dist/string.js +7 -10
  52. package/dist/string.js.map +1 -1
  53. package/dist/time.d.ts +29 -7
  54. package/dist/time.d.ts.map +1 -1
  55. package/dist/time.js +55 -11
  56. package/dist/time.js.map +1 -1
  57. package/dist/types/filtered-key-path.d.ts +1 -2
  58. package/dist/types/filtered-key-path.d.ts.map +1 -1
  59. package/dist/types/index.d.ts +1 -6
  60. package/dist/types/index.d.ts.map +1 -1
  61. package/dist/types/vue.d.ts +1 -3
  62. package/dist/types/vue.d.ts.map +1 -1
  63. package/dist/url.d.ts.map +1 -1
  64. package/dist/url.js.map +1 -1
  65. package/dist/vue.d.ts +6 -8
  66. package/dist/vue.d.ts.map +1 -1
  67. package/dist/vue.js +3 -3
  68. package/dist/vue.js.map +1 -1
  69. package/dist/web.d.ts.map +1 -1
  70. package/dist/web.js +2 -1
  71. package/dist/web.js.map +1 -1
  72. package/package.json +28 -27
  73. package/src/classes/ssh-client.ts +4 -6
  74. package/src/crypto-hash.ts +26 -24
  75. package/src/storages/redis/types.ts +2 -4
  76. package/src/time.ts +65 -15
  77. package/src/types/index.ts +0 -5
  78. package/src/types/vue.ts +1 -3
  79. package/src/vue.ts +6 -7
@@ -1 +1 @@
1
- {"version":3,"file":"crypto-hash.js","names":[],"sources":["../src/crypto-hash.ts"],"sourcesContent":["import { createHash } from 'node:crypto';\nimport type {\n BinaryLike,\n BinaryToTextEncoding,\n} from 'node:crypto';\n\n/**\n * Computes the MD5 hash of the given data.\n *\n * @param {BinaryLike} data - The input data to hash\n * @param {BinaryToTextEncoding} [outputEncoding] - The output encoding (default: `'hex'`)\n *\n * @returns {string | Buffer} The hash digest in the specified encoding\n *\n * @example\n * ```typescript\n * import { cryptoMd5 } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoMd5('test')); // 098f6bcd4621d373cade4e832627b4f6\n * ```\n */\nexport function cryptoMd5(data: BinaryLike, outputEncoding: BinaryToTextEncoding = 'hex') {\n return createHash('md5').update(data).digest(outputEncoding);\n}\n\n/**\n * Computes the MD5 hash of the given data and returns the raw buffer.\n *\n * @param {BinaryLike} data - The input data to hash\n *\n * @returns {Buffer} The raw hash digest as a Buffer\n *\n * @example\n * ```typescript\n * import { cryptoMd5ToBuffer } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoMd5ToBuffer('test')); // <Buffer 33 ed 9a ...>\n * ```\n */\nexport function cryptoMd5ToBuffer(data: BinaryLike) {\n return createHash('md5').update(data).digest();\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 224-bit digest.\n *\n * @param {BinaryLike} data - The input data to hash\n * @param {BinaryToTextEncoding} [outputEncoding] - The output encoding (default: `'hex'`)\n *\n * @returns {string | Buffer} The hash digest in the specified encoding\n *\n * @example\n * ```typescript\n * import { cryptoSha3224 } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3224('test')); // 3797bf0afbbfca4a7bbba7602a2b552746876517a7f9b7ce2db0ae7b\n * ```\n */\nexport function cryptoSha3224(data: BinaryLike, outputEncoding: BinaryToTextEncoding = 'hex') {\n return createHash('sha3-224').update(data).digest(outputEncoding);\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 224-bit digest and returns the raw buffer.\n *\n * @param {BinaryLike} data - The input data to hash\n *\n * @returns {Buffer} The raw hash digest as a Buffer\n *\n * @example\n * ```typescript\n * import { cryptoSha3224ToBuffer } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3224ToBuffer('test')); // <Buffer 37 97 bf 0a ...>\n * ```\n */\nexport function cryptoSha3224ToBuffer(data: BinaryLike) {\n return createHash('sha3-224').update(data).digest();\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 256-bit digest.\n *\n * @param {BinaryLike} data - The input data to hash\n * @param {BinaryToTextEncoding} [outputEncoding] - The output encoding (default: `'hex'`)\n *\n * @returns {string | Buffer} The hash digest in the specified encoding\n *\n * @example\n * ```typescript\n * import { cryptoSha3256 } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3256('test')); // 36f028580bb02cc8272a9a020f4200e346e276ae664e45ee80745574e2f5ab80\n * ```\n */\nexport function cryptoSha3256(data: BinaryLike, outputEncoding: BinaryToTextEncoding = 'hex') {\n return createHash('sha3-256').update(data).digest(outputEncoding);\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 256-bit digest and returns the raw buffer.\n *\n * @param {BinaryLike} data - The input data to hash\n *\n * @returns {Buffer} The raw hash digest as a Buffer\n *\n * @example\n * ```typescript\n * import { cryptoSha3256ToBuffer } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3256ToBuffer('test')); // <Buffer 36 f0 28 ...>\n * ```\n */\nexport function cryptoSha3256ToBuffer(data: BinaryLike) {\n return createHash('sha3-256').update(data).digest();\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 384-bit digest.\n *\n * @param {BinaryLike} data - The input data to hash\n * @param {BinaryToTextEncoding} [outputEncoding] - The output encoding (default: `'hex'`)\n *\n * @returns {string | Buffer} The hash digest in the specified encoding\n *\n * @example\n * ```typescript\n * import { cryptoSha3384 } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3384('test')); // e516dabb23b6e30026863543282780a3ae0dccf05551cf0295178d7f...\n * ```\n */\nexport function cryptoSha3384(data: BinaryLike, outputEncoding: BinaryToTextEncoding = 'hex') {\n return createHash('sha3-384').update(data).digest(outputEncoding);\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 384-bit digest and returns the raw buffer.\n *\n * @param {BinaryLike} data - The input data to hash\n *\n * @returns {Buffer} The raw hash digest as a Buffer\n *\n * @example\n * ```typescript\n * import { cryptoSha3384ToBuffer } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3384ToBuffer('test')); // <Buffer e5 16 da bb ...>\n * ```\n */\nexport function cryptoSha3384ToBuffer(data: BinaryLike) {\n return createHash('sha3-384').update(data).digest();\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 512-bit digest.\n *\n * @param {BinaryLike} data - The input data to hash\n * @param {BinaryToTextEncoding} [outputEncoding] - The output encoding (default: `'hex'`)\n *\n * @returns {string | Buffer} The hash digest in the specified encoding\n *\n * @example\n * ```typescript\n * import { cryptoSha3512 } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3512('test')); // 9ece086e9bac491fac5c1d1046ca11d737b92a2b2ebd93f005d7...\n * ```\n */\nexport function cryptoSha3512(data: BinaryLike, outputEncoding: BinaryToTextEncoding = 'hex') {\n return createHash('sha3-512').update(data).digest(outputEncoding);\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 512-bit digest and returns the raw buffer.\n *\n * @param {BinaryLike} data - The input data to hash\n *\n * @returns {Buffer} The raw hash digest as a Buffer\n *\n * @example\n * ```typescript\n * import { cryptoSha3512ToBuffer } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3512ToBuffer('test')); // <Buffer 9e ce 08 6e ...>\n * ```\n */\nexport function cryptoSha3512ToBuffer(data: BinaryLike) {\n return createHash('sha3-512').update(data).digest();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAqBA,SAAgB,UAAU,MAAkB,iBAAuC,OAAO;CACtF,OAAO,WAAW,KAAK,EAAE,OAAO,IAAI,EAAE,OAAO,cAAc;AAC/D;;;;;;;;;;;;;;;AAgBA,SAAgB,kBAAkB,MAAkB;CAChD,OAAO,WAAW,KAAK,EAAE,OAAO,IAAI,EAAE,OAAO;AACjD;;;;;;;;;;;;;;;;AAiBA,SAAgB,cAAc,MAAkB,iBAAuC,OAAO;CAC1F,OAAO,WAAW,UAAU,EAAE,OAAO,IAAI,EAAE,OAAO,cAAc;AACpE;;;;;;;;;;;;;;;AAgBA,SAAgB,sBAAsB,MAAkB;CACpD,OAAO,WAAW,UAAU,EAAE,OAAO,IAAI,EAAE,OAAO;AACtD;;;;;;;;;;;;;;;;AAiBA,SAAgB,cAAc,MAAkB,iBAAuC,OAAO;CAC1F,OAAO,WAAW,UAAU,EAAE,OAAO,IAAI,EAAE,OAAO,cAAc;AACpE;;;;;;;;;;;;;;;AAgBA,SAAgB,sBAAsB,MAAkB;CACpD,OAAO,WAAW,UAAU,EAAE,OAAO,IAAI,EAAE,OAAO;AACtD;;;;;;;;;;;;;;;;AAiBA,SAAgB,cAAc,MAAkB,iBAAuC,OAAO;CAC1F,OAAO,WAAW,UAAU,EAAE,OAAO,IAAI,EAAE,OAAO,cAAc;AACpE;;;;;;;;;;;;;;;AAgBA,SAAgB,sBAAsB,MAAkB;CACpD,OAAO,WAAW,UAAU,EAAE,OAAO,IAAI,EAAE,OAAO;AACtD;;;;;;;;;;;;;;;;AAiBA,SAAgB,cAAc,MAAkB,iBAAuC,OAAO;CAC1F,OAAO,WAAW,UAAU,EAAE,OAAO,IAAI,EAAE,OAAO,cAAc;AACpE;;;;;;;;;;;;;;;AAgBA,SAAgB,sBAAsB,MAAkB;CACpD,OAAO,WAAW,UAAU,EAAE,OAAO,IAAI,EAAE,OAAO;AACtD"}
1
+ {"version":3,"file":"crypto-hash.js","names":[],"sources":["../src/crypto-hash.ts"],"sourcesContent":["import { Buffer } from 'node:buffer';\nimport { createHash } from 'node:crypto';\nimport type { BinaryLike } from 'node:crypto';\n\n/**\n * Computes the MD5 hash of the given data.\n *\n * @param {BinaryLike} data - The input data to hash\n * @param {BufferEncoding} [outputEncoding] - The output encoding (default: `'hex'`)\n *\n * @returns {string | Buffer} The hash digest in the specified encoding\n *\n * @example\n * ```typescript\n * import { cryptoMd5 } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoMd5('test')); // 098f6bcd4621d373cade4e832627b4f6\n * ```\n */\nexport function cryptoMd5(data: BinaryLike, outputEncoding: BufferEncoding = 'hex') {\n return createHash('md5').update(normalizeHashData(data)).digest(outputEncoding);\n}\n\n/**\n * Computes the MD5 hash of the given data and returns the raw buffer.\n *\n * @param {BinaryLike} data - The input data to hash\n *\n * @returns {Buffer} The raw hash digest as a Buffer\n *\n * @example\n * ```typescript\n * import { cryptoMd5ToBuffer } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoMd5ToBuffer('test')); // <Buffer 33 ed 9a ...>\n * ```\n */\nexport function cryptoMd5ToBuffer(data: BinaryLike) {\n return createHash('md5').update(normalizeHashData(data)).digest();\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 224-bit digest.\n *\n * @param {BinaryLike} data - The input data to hash\n * @param {BufferEncoding} [outputEncoding] - The output encoding (default: `'hex'`)\n *\n * @returns {string | Buffer} The hash digest in the specified encoding\n *\n * @example\n * ```typescript\n * import { cryptoSha3224 } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3224('test')); // 3797bf0afbbfca4a7bbba7602a2b552746876517a7f9b7ce2db0ae7b\n * ```\n */\nexport function cryptoSha3224(data: BinaryLike, outputEncoding: BufferEncoding = 'hex') {\n return createHash('sha3-224').update(normalizeHashData(data)).digest(outputEncoding);\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 224-bit digest and returns the raw buffer.\n *\n * @param {BinaryLike} data - The input data to hash\n *\n * @returns {Buffer} The raw hash digest as a Buffer\n *\n * @example\n * ```typescript\n * import { cryptoSha3224ToBuffer } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3224ToBuffer('test')); // <Buffer 37 97 bf 0a ...>\n * ```\n */\nexport function cryptoSha3224ToBuffer(data: BinaryLike) {\n return createHash('sha3-224').update(normalizeHashData(data)).digest();\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 256-bit digest.\n *\n * @param {BinaryLike} data - The input data to hash\n * @param {BufferEncoding} [outputEncoding] - The output encoding (default: `'hex'`)\n *\n * @returns {string | Buffer} The hash digest in the specified encoding\n *\n * @example\n * ```typescript\n * import { cryptoSha3256 } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3256('test')); // 36f028580bb02cc8272a9a020f4200e346e276ae664e45ee80745574e2f5ab80\n * ```\n */\nexport function cryptoSha3256(data: BinaryLike, outputEncoding: BufferEncoding = 'hex') {\n return createHash('sha3-256').update(normalizeHashData(data)).digest(outputEncoding);\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 256-bit digest and returns the raw buffer.\n *\n * @param {BinaryLike} data - The input data to hash\n *\n * @returns {Buffer} The raw hash digest as a Buffer\n *\n * @example\n * ```typescript\n * import { cryptoSha3256ToBuffer } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3256ToBuffer('test')); // <Buffer 36 f0 28 ...>\n * ```\n */\nexport function cryptoSha3256ToBuffer(data: BinaryLike) {\n return createHash('sha3-256').update(normalizeHashData(data)).digest();\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 384-bit digest.\n *\n * @param {BinaryLike} data - The input data to hash\n * @param {BufferEncoding} [outputEncoding] - The output encoding (default: `'hex'`)\n *\n * @returns {string | Buffer} The hash digest in the specified encoding\n *\n * @example\n * ```typescript\n * import { cryptoSha3384 } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3384('test')); // e516dabb23b6e30026863543282780a3ae0dccf05551cf0295178d7f...\n * ```\n */\nexport function cryptoSha3384(data: BinaryLike, outputEncoding: BufferEncoding = 'hex') {\n return createHash('sha3-384').update(normalizeHashData(data)).digest(outputEncoding);\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 384-bit digest and returns the raw buffer.\n *\n * @param {BinaryLike} data - The input data to hash\n *\n * @returns {Buffer} The raw hash digest as a Buffer\n *\n * @example\n * ```typescript\n * import { cryptoSha3384ToBuffer } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3384ToBuffer('test')); // <Buffer e5 16 da bb ...>\n * ```\n */\nexport function cryptoSha3384ToBuffer(data: BinaryLike) {\n return createHash('sha3-384').update(normalizeHashData(data)).digest();\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 512-bit digest.\n *\n * @param {BinaryLike} data - The input data to hash\n * @param {BufferEncoding} [outputEncoding] - The output encoding (default: `'hex'`)\n *\n * @returns {string | Buffer} The hash digest in the specified encoding\n *\n * @example\n * ```typescript\n * import { cryptoSha3512 } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3512('test')); // 9ece086e9bac491fac5c1d1046ca11d737b92a2b2ebd93f005d7...\n * ```\n */\nexport function cryptoSha3512(data: BinaryLike, outputEncoding: BufferEncoding = 'hex') {\n return createHash('sha3-512').update(normalizeHashData(data)).digest(outputEncoding);\n}\n\n/**\n * Computes the SHA-3 hash of the given data using the 512-bit digest and returns the raw buffer.\n *\n * @param {BinaryLike} data - The input data to hash\n *\n * @returns {Buffer} The raw hash digest as a Buffer\n *\n * @example\n * ```typescript\n * import { cryptoSha3512ToBuffer } from '@kikiutils/shared/crypto-hash';\n *\n * console.log(cryptoSha3512ToBuffer('test')); // <Buffer 9e ce 08 6e ...>\n * ```\n */\nexport function cryptoSha3512ToBuffer(data: BinaryLike) {\n return createHash('sha3-512').update(normalizeHashData(data)).digest();\n}\n\nfunction normalizeHashData(data: BinaryLike): NodeJS.ArrayBufferView | string {\n return typeof data === 'string' || ArrayBuffer.isView(data) ? data : Buffer.from(data);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,SAAgB,UAAU,MAAkB,iBAAiC,OAAO;CAChF,OAAO,WAAW,KAAK,CAAC,CAAC,OAAO,kBAAkB,IAAI,CAAC,CAAC,CAAC,OAAO,cAAc;AAClF;;;;;;;;;;;;;;;AAgBA,SAAgB,kBAAkB,MAAkB;CAChD,OAAO,WAAW,KAAK,CAAC,CAAC,OAAO,kBAAkB,IAAI,CAAC,CAAC,CAAC,OAAO;AACpE;;;;;;;;;;;;;;;;AAiBA,SAAgB,cAAc,MAAkB,iBAAiC,OAAO;CACpF,OAAO,WAAW,UAAU,CAAC,CAAC,OAAO,kBAAkB,IAAI,CAAC,CAAC,CAAC,OAAO,cAAc;AACvF;;;;;;;;;;;;;;;AAgBA,SAAgB,sBAAsB,MAAkB;CACpD,OAAO,WAAW,UAAU,CAAC,CAAC,OAAO,kBAAkB,IAAI,CAAC,CAAC,CAAC,OAAO;AACzE;;;;;;;;;;;;;;;;AAiBA,SAAgB,cAAc,MAAkB,iBAAiC,OAAO;CACpF,OAAO,WAAW,UAAU,CAAC,CAAC,OAAO,kBAAkB,IAAI,CAAC,CAAC,CAAC,OAAO,cAAc;AACvF;;;;;;;;;;;;;;;AAgBA,SAAgB,sBAAsB,MAAkB;CACpD,OAAO,WAAW,UAAU,CAAC,CAAC,OAAO,kBAAkB,IAAI,CAAC,CAAC,CAAC,OAAO;AACzE;;;;;;;;;;;;;;;;AAiBA,SAAgB,cAAc,MAAkB,iBAAiC,OAAO;CACpF,OAAO,WAAW,UAAU,CAAC,CAAC,OAAO,kBAAkB,IAAI,CAAC,CAAC,CAAC,OAAO,cAAc;AACvF;;;;;;;;;;;;;;;AAgBA,SAAgB,sBAAsB,MAAkB;CACpD,OAAO,WAAW,UAAU,CAAC,CAAC,OAAO,kBAAkB,IAAI,CAAC,CAAC,CAAC,OAAO;AACzE;;;;;;;;;;;;;;;;AAiBA,SAAgB,cAAc,MAAkB,iBAAiC,OAAO;CACpF,OAAO,WAAW,UAAU,CAAC,CAAC,OAAO,kBAAkB,IAAI,CAAC,CAAC,CAAC,OAAO,cAAc;AACvF;;;;;;;;;;;;;;;AAgBA,SAAgB,sBAAsB,MAAkB;CACpD,OAAO,WAAW,UAAU,CAAC,CAAC,OAAO,kBAAkB,IAAI,CAAC,CAAC,CAAC,OAAO;AACzE;AAEA,SAAS,kBAAkB,MAAmD;CAC1E,OAAO,OAAO,SAAS,YAAY,YAAY,OAAO,IAAI,IAAI,OAAO,OAAO,KAAK,IAAI;AACzF"}
@@ -1,5 +1,4 @@
1
1
  import { DateArg, Day, FormatOptions } from "date-fns";
2
-
3
2
  //#region src/datetime.d.ts
4
3
  type DateRangeType = 'lastMonth' | 'lastWeek' | 'thisMonth' | 'thisWeek' | 'today' | 'yesterday';
5
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"datetime.d.ts","names":[],"sources":["../src/datetime.ts"],"mappings":";;;KAkBY,aAAA;;AAAZ;;;;AAAyB;AA2BzB;;;;;;;;;;;;;;;AAAoH;AA+BpH;;;iBA/BgB,UAAA,CAAW,IAAA,EAAM,OAAA,CAAQ,IAAA,QAAY,MAAA,WAAwC,OAAA,GAAU,aAAA;;;;;;;;;;;;;;;;;;;;;AAwGvG;;;;AAA+D;;;iBAzE/C,oBAAA,CACZ,IAAA,EAAM,IAAA,EACN,IAAA,EAAM,aAAA,EACN,OAAA;EACI,wBAAA;EACA,YAAA,GAAe,GAAA;AAAA;;;;;;;;;;;;;;;;;;;;iBAoEP,wBAAA,CAAyB,UAAA,YAAsB,IAAA"}
1
+ {"version":3,"file":"datetime.d.ts","names":[],"sources":["../src/datetime.ts"],"mappings":";;KAkBY;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BI,WAAW,MAAM,QAAQ,YAAY,iBAAwC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+BvF,qBACZ,MAAM,MACN,MAAM,eACN;EACI;EACA,eAAe;;;;;;;;;;;;;;;;;;;;;iBAoEP,yBAAyB,sBAAsB"}
@@ -1,6 +1,5 @@
1
1
  import { RuleType } from "async-validator";
2
2
  import { FormItemRule } from "element-plus";
3
-
4
3
  //#region src/element-plus.d.ts
5
4
  type DoNotRemoveOrUseThisType = RuleType;
6
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"element-plus.d.ts","names":[],"sources":["../src/element-plus.ts"],"mappings":";;;;KAGY,wBAAA,GAA2B,QAAQ;;AAA/C;;;;AAA+C;AAyB/C;;;;;;;;;;;;;;AAGe;;;iBAHC,gCAAA,CACZ,OAAA,EAAS,YAAA,aACT,OAAA,GAAS,YAAA,GACV,YAAA"}
1
+ {"version":3,"file":"element-plus.d.ts","names":[],"sources":["../src/element-plus.ts"],"mappings":";;;KAGY,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;iBAyBvB,iCACZ,SAAS,yBACT,UAAS,eACV"}
@@ -1 +1 @@
1
- {"version":3,"file":"enum.d.ts","names":[],"sources":["../src/enum.ts"],"mappings":";;AAuBA;;;;;;;;;;;;;;;;;;AAAoG;AA2BpG;;;iBA3BgB,mBAAA,WAA8B,MAAA,cAAA,CAAqB,UAAA,EAAY,CAAA,GAAI,OAAA,CAAQ,CAAA,OAAQ,CAAA;;;;;;;;;;;;;;;AA2BC;AAkDpG;;;;;;;;iBAlDgB,mBAAA,WAA8B,MAAA,cAAA,CAAqB,UAAA,EAAY,CAAA,GAAI,OAAA,CAAQ,CAAA,OAAQ,CAAA;;;;;;;;AAkDZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAvE,aAAA,WAAwB,MAAA,cAAA,CAAqB,UAAA,EAAY,CAAA,IAAK,CAAA,OAAQ,CAAA"}
1
+ {"version":3,"file":"enum.d.ts","names":[],"sources":["../src/enum.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;iBAuBgB,oBAAoB,UAAU,qBAAqB,YAAY,IAAI,QAAQ,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;iBA2BnF,oBAAoB,UAAU,qBAAqB,YAAY,IAAI,QAAQ,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkDnF,cAAc,UAAU,qBAAqB,YAAY,KAAK,QAAQ"}
package/dist/enum.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"enum.js","names":[],"sources":["../src/enum.ts"],"sourcesContent":["/**\n * Extracts only the numeric values from an enumeration-like object.\n *\n * @template T - The type of the enum object\n *\n * @param {T} enumObject - The enumeration-like object to extract numeric values from,\n * the object can contain numeric values, string values, or both.\n *\n * @returns {Extract<T[keyof T], number>[]} An array of numeric values extracted from the enum object\n *\n * @example\n * ```typescript\n * import { getEnumNumberValues } from '@kikiutils/shared/enum';\n *\n * enum RecordType {\n * Receive = 0,\n * Send = 1,\n * Unknown = 'unknown'\n * }\n *\n * console.log(getEnumNumberValues(RecordType)); // [0, 1]\n * ```\n */\nexport function getEnumNumberValues<T extends Record<string, any>>(enumObject: T): Extract<T[keyof T], number>[] {\n return getEnumValues(enumObject).filter((value) => typeof value === 'number');\n}\n\n/**\n * Extracts only the string values from an enumeration-like object.\n *\n * @template T - The type of the enum object\n *\n * @param {T} enumObject - The enumeration-like object to extract string values from,\n * the object can contain numeric values, string values, or both.\n *\n * @returns {Extract<T[keyof T], string>[]} An array of string values extracted from the enum object\n *\n * @example\n * ```typescript\n * import { getEnumStringValues } from '@kikiutils/shared/enum';\n *\n * enum RecordType {\n * Receive = 0,\n * Send = 1,\n * Unknown = 'unknown'\n * }\n *\n * console.log(getEnumStringValues(RecordType)); // ['unknown']\n * ```\n */\nexport function getEnumStringValues<T extends Record<string, any>>(enumObject: T): Extract<T[keyof T], string>[] {\n return getEnumValues(enumObject).filter((value) => typeof value === 'string');\n}\n\n/**\n * Extracts all values from an enumeration-like object.\n *\n * This function handles TypeScript enums correctly by accounting for the reverse mapping\n * that occurs with numeric enums. It works with pure numeric enums, pure string enums,\n * and mixed enums.\n *\n * @template T - The type of the enum object\n *\n * @param {T} enumObject - The enumeration-like object to extract values from,\n * the object can contain numeric values, string values, or both.\n *\n * @returns {(T[keyof T])[]} An array containing all the values from the enum object\n *\n * @example\n * ```typescript\n * import { getEnumValues } from '@kikiutils/shared/enum';\n *\n * // Numeric enum\n * enum Status {\n * Active = 0,\n * Inactive = 1,\n * Pending = 2\n * }\n *\n * console.log(getEnumValues(Status)); // [0, 1, 2]\n *\n * // String enum\n * enum Color {\n * Red = 'RED',\n * Green = 'GREEN',\n * Blue = 'BLUE'\n * }\n *\n * console.log(getEnumValues(Color)); // ['RED', 'GREEN', 'BLUE']\n *\n * // Mixed enum\n * enum RecordType {\n * Receive = 0,\n * Send = 1,\n * Unknown = 'unknown'\n * }\n *\n * console.log(getEnumValues(RecordType)); // [0, 1, 'unknown']\n * ```\n */\nexport function getEnumValues<T extends Record<string, any>>(enumObject: T): (T[keyof T])[] {\n const values = Object.values(enumObject);\n const hasNumberValues = values.some((value) => typeof value === 'number');\n if (!hasNumberValues) return values;\n return Object.keys(enumObject).filter((key) => Number.isNaN(Number(key))).map((key) => enumObject[key]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,oBAAmD,YAA8C;CAC7G,OAAO,cAAc,UAAU,EAAE,QAAQ,UAAU,OAAO,UAAU,QAAQ;AAChF;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,oBAAmD,YAA8C;CAC7G,OAAO,cAAc,UAAU,EAAE,QAAQ,UAAU,OAAO,UAAU,QAAQ;AAChF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,cAA6C,YAA+B;CACxF,MAAM,SAAS,OAAO,OAAO,UAAU;CAEvC,IAAI,CADoB,OAAO,MAAM,UAAU,OAAO,UAAU,QAC7C,GAAG,OAAO;CAC7B,OAAO,OAAO,KAAK,UAAU,EAAE,QAAQ,QAAQ,OAAO,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,KAAK,QAAQ,WAAW,IAAI;AAC1G"}
1
+ {"version":3,"file":"enum.js","names":[],"sources":["../src/enum.ts"],"sourcesContent":["/**\n * Extracts only the numeric values from an enumeration-like object.\n *\n * @template T - The type of the enum object\n *\n * @param {T} enumObject - The enumeration-like object to extract numeric values from,\n * the object can contain numeric values, string values, or both.\n *\n * @returns {Extract<T[keyof T], number>[]} An array of numeric values extracted from the enum object\n *\n * @example\n * ```typescript\n * import { getEnumNumberValues } from '@kikiutils/shared/enum';\n *\n * enum RecordType {\n * Receive = 0,\n * Send = 1,\n * Unknown = 'unknown'\n * }\n *\n * console.log(getEnumNumberValues(RecordType)); // [0, 1]\n * ```\n */\nexport function getEnumNumberValues<T extends Record<string, any>>(enumObject: T): Extract<T[keyof T], number>[] {\n return getEnumValues(enumObject).filter((value) => typeof value === 'number');\n}\n\n/**\n * Extracts only the string values from an enumeration-like object.\n *\n * @template T - The type of the enum object\n *\n * @param {T} enumObject - The enumeration-like object to extract string values from,\n * the object can contain numeric values, string values, or both.\n *\n * @returns {Extract<T[keyof T], string>[]} An array of string values extracted from the enum object\n *\n * @example\n * ```typescript\n * import { getEnumStringValues } from '@kikiutils/shared/enum';\n *\n * enum RecordType {\n * Receive = 0,\n * Send = 1,\n * Unknown = 'unknown'\n * }\n *\n * console.log(getEnumStringValues(RecordType)); // ['unknown']\n * ```\n */\nexport function getEnumStringValues<T extends Record<string, any>>(enumObject: T): Extract<T[keyof T], string>[] {\n return getEnumValues(enumObject).filter((value) => typeof value === 'string');\n}\n\n/**\n * Extracts all values from an enumeration-like object.\n *\n * This function handles TypeScript enums correctly by accounting for the reverse mapping\n * that occurs with numeric enums. It works with pure numeric enums, pure string enums,\n * and mixed enums.\n *\n * @template T - The type of the enum object\n *\n * @param {T} enumObject - The enumeration-like object to extract values from,\n * the object can contain numeric values, string values, or both.\n *\n * @returns {(T[keyof T])[]} An array containing all the values from the enum object\n *\n * @example\n * ```typescript\n * import { getEnumValues } from '@kikiutils/shared/enum';\n *\n * // Numeric enum\n * enum Status {\n * Active = 0,\n * Inactive = 1,\n * Pending = 2\n * }\n *\n * console.log(getEnumValues(Status)); // [0, 1, 2]\n *\n * // String enum\n * enum Color {\n * Red = 'RED',\n * Green = 'GREEN',\n * Blue = 'BLUE'\n * }\n *\n * console.log(getEnumValues(Color)); // ['RED', 'GREEN', 'BLUE']\n *\n * // Mixed enum\n * enum RecordType {\n * Receive = 0,\n * Send = 1,\n * Unknown = 'unknown'\n * }\n *\n * console.log(getEnumValues(RecordType)); // [0, 1, 'unknown']\n * ```\n */\nexport function getEnumValues<T extends Record<string, any>>(enumObject: T): (T[keyof T])[] {\n const values = Object.values(enumObject);\n const hasNumberValues = values.some((value) => typeof value === 'number');\n if (!hasNumberValues) return values;\n return Object.keys(enumObject).filter((key) => Number.isNaN(Number(key))).map((key) => enumObject[key]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,oBAAmD,YAA8C;CAC7G,OAAO,cAAc,UAAU,CAAC,CAAC,QAAQ,UAAU,OAAO,UAAU,QAAQ;AAChF;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,oBAAmD,YAA8C;CAC7G,OAAO,cAAc,UAAU,CAAC,CAAC,QAAQ,UAAU,OAAO,UAAU,QAAQ;AAChF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,cAA6C,YAA+B;CACxF,MAAM,SAAS,OAAO,OAAO,UAAU;CAEvC,IAAI,CADoB,OAAO,MAAM,UAAU,OAAO,UAAU,QAC7C,GAAG,OAAO;CAC7B,OAAO,OAAO,KAAK,UAAU,CAAC,CAAC,QAAQ,QAAQ,OAAO,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ,WAAW,IAAI;AAC1G"}
package/dist/env.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","names":[],"sources":["../src/env.ts"],"mappings":";;AAOA;;;;;;cAAa,wBAAA,SAAiC,KAAK;EAAA,SACtC,GAAA;EAOc;AAAA;AA+B3B;;;cA/BgB,GAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;iBA+BA,mBAAA,CAAoB,GAAW"}
1
+ {"version":3,"file":"env.d.ts","names":[],"sources":["../src/env.ts"],"mappings":";;;;;;;;cAOa,iCAAiC;WACjC;;;;;;EAOG,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;iBA+BA,oBAAoB"}
@@ -1 +1 @@
1
- {"version":3,"file":"event-awaiter.d.ts","names":[],"sources":["../src/event-awaiter.ts"],"mappings":";;AAYA;;;;;;;;;;;cAAa,YAAA;EAAA;EAiIuD;;;;;;;;EAtHhE,OAAA,CAAQ,GAAA,UAAa,KAAA,EAAO,CAAA;EAiB5B;;;;;;;;;EAAA,UAAA,CAAW,KAAA,GAAO,CAAA;EA4BsE;;;;;;;;;;;;;;;;AAyExB;;;;;;;EAzEhE,IAAA,CAAK,GAAA,UAAa,SAAA,WAAoB,IAAA,0BAA8B,MAAA,GAAS,WAAA,GAAW,OAAA,CAAA,CAAA;;;;;;;;;;;EA2DxF,aAAA,CAAc,GAAA,UAAa,SAAA,WAAoB,MAAA,GAAS,WAAA,GAAW,OAAA,CAAA,CAAA;;;;;;;;;;;EAcnE,UAAA,CAAW,GAAA,UAAa,SAAA,WAAoB,MAAA,GAAS,WAAA,GAAW,OAAA,CAAA,CAAA;AAAA"}
1
+ {"version":3,"file":"event-awaiter.d.ts","names":[],"sources":["../src/event-awaiter.ts"],"mappings":";;;;;;;;;;;;;cAYa,aAAa;;;;;;;;;;EAWtB,QAAQ,aAAa,OAAO;;;;;;;;;;EAiB5B,WAAW,QAAO;;;;;;;;;;;;;;;;;;;;;;;;EA4BlB,KAAK,aAAa,oBAAoB,8BAA8B,SAAS,cAAW,QAAA;;;;;;;;;;;EA2DxF,cAAc,aAAa,oBAAoB,SAAS,cAAW,QAAA;;;;;;;;;;;EAcnE,WAAW,aAAa,oBAAoB,SAAS,cAAW,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"general.d.ts","names":[],"sources":["../src/general.ts"],"mappings":";;AA2BA;;;;;;;;;;;;;;AAAuD;AACvD;;;;;;;;;iBADgB,iBAAA,GAAA,CAAqB,KAAA,EAAO,CAAA,GAAI,CAAA,KAAM,CAAA;AAAA,iBACtC,iBAAA,MAAA,CAAwB,KAAA,EAAO,CAAA,GAAI,CAAA,IAAK,YAAA,EAAc,CAAA,GAAI,CAAA,GAAI,WAAA,CAAY,CAAA"}
1
+ {"version":3,"file":"general.d.ts","names":[],"sources":["../src/general.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BgB,kBAAkB,GAAG,OAAO,IAAI,MAAM;iBACtC,kBAAkB,GAAG,GAAG,OAAO,IAAI,KAAK,cAAc,IAAI,IAAI,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"hash.d.ts","names":[],"sources":["../src/hash.ts"],"mappings":";;AAyBA;;;;AAAiD;AAkBjD;;;;AAAiD;AAkBjD;;;iBApCgB,OAAA,CAAQ,IAAyB,WAAV,UAAU;AAoCA;AAkBjD;;;;AAAiD;;;;;;;;;AAlBA,iBAlBjC,OAAA,CAAQ,IAAyB,WAAV,UAAU;;;;;;;;;;;;;;;iBAkBjC,OAAA,CAAQ,IAAyB,WAAV,UAAU;;;;;;;;;;;;;;;iBAkBjC,OAAA,CAAQ,IAAyB,WAAV,UAAU"}
1
+ {"version":3,"file":"hash.d.ts","names":[],"sources":["../src/hash.ts"],"mappings":";;;;;;;;;;;;;;;iBAyBgB,QAAQ,eAAe;;;;;;;;;;;;;;;iBAkBvB,QAAQ,eAAe;;;;;;;;;;;;;;;iBAkBvB,QAAQ,eAAe;;;;;;;;;;;;;;;iBAkBvB,QAAQ,eAAe"}
package/dist/math.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Decimal } from "decimal.js";
2
-
3
2
  //#region src/math.d.ts
4
3
  type CalculableValue = Decimal.Value | {
5
4
  toString: () => string;
@@ -1 +1 @@
1
- {"version":3,"file":"math.d.ts","names":[],"sources":["../src/math.ts"],"mappings":";;;KAEK,eAAA,GAAkB,OAAA,CAAQ,KAAK;EAAK,QAAA;AAAA;;;;UAKxB,yBAAA;EALc;;;AAAkB;AAKjD;EAMI,aAAA;;;AAOU;AAyBd;;EAzBI,UAAU;AAAA;;;;;;;;;;;;AA4ByB;;;;;;;;;;;iBAHvB,kBAAA,CACZ,SAAA,EAAW,eAAA,EACX,WAAA,EAAa,eAAA,EACb,OAAA,GAAU,yBAAA"}
1
+ {"version":3,"file":"math.d.ts","names":[],"sources":["../src/math.ts"],"mappings":";;KAEK,kBAAkB,QAAQ;EAAU;;;;;UAKxB;;;;;;EAMb;;;;;;EAOA;;;;;;;;;;;;;;;;;;;;;;;;iBAyBY,mBACZ,WAAW,iBACX,aAAa,iBACb,UAAU"}
package/dist/math.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"math.js","names":[],"sources":["../src/math.ts"],"sourcesContent":["import { Decimal } from 'decimal.js';\n\ntype CalculableValue = Decimal.Value | { toString: () => string };\n\n/**\n * Options for configuring the output of `toPercentageString`.\n */\nexport interface ToPercentageStringOptions {\n /**\n * Number of decimal places to include in the result.\n *\n * @default 2\n */\n decimalPlaces?: number;\n\n /**\n * Whether to include the '%' symbol in the result.\n *\n * @default true\n */\n withSymbol?: boolean;\n}\n\n/**\n * Converts a fraction (numerator / denominator) into a percentage string.\n *\n * - Uses `decimal.js` for precise decimal calculations.\n * - Supports custom decimal places and optional percentage symbol.\n * - Returns `'0.00%'` if result is `NaN` or division is invalid.\n *\n * @param {CalculableValue} molecular - The numerator of the fraction\n * @param {CalculableValue} denominator - The denominator of the fraction\n * @param {ToPercentageStringOptions} [options] - Optional output settings\n *\n * @returns {string} Formatted percentage string\n *\n * @example\n * ```typescript\n * import { toPercentageString } from '@kikiutils/shared/math';\n *\n * console.log(toPercentageString(50, 200)); // 25.00%\n * console.log(toPercentageString(50, 200, { withSymbol: false })); // 25.00\n * console.log(toPercentageString(50, 200, { decimalPlaces: 1 })); // 25.0%\n * ```\n */\nexport function toPercentageString(\n molecular: CalculableValue,\n denominator: CalculableValue,\n options?: ToPercentageStringOptions,\n) {\n const molecularDecimal = new Decimal(molecular.toString());\n const denominatorDecimal = new Decimal(denominator.toString());\n const calculationResult = molecularDecimal.div(denominatorDecimal);\n\n const result = calculationResult.isNaN() || !calculationResult.isFinite()\n ? '0.00'\n : calculationResult.times(100).toFixed(options?.decimalPlaces ?? 2);\n\n return options?.withSymbol ?? true ? `${result}%` : result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA6CA,SAAgB,mBACZ,WACA,aACA,SACF;CACE,MAAM,mBAAmB,IAAI,QAAQ,UAAU,SAAS,CAAC;CACzD,MAAM,qBAAqB,IAAI,QAAQ,YAAY,SAAS,CAAC;CAC7D,MAAM,oBAAoB,iBAAiB,IAAI,kBAAkB;CAEjE,MAAM,SAAS,kBAAkB,MAAM,KAAK,CAAC,kBAAkB,SAAS,IAClE,SACA,kBAAkB,MAAM,GAAG,EAAE,QAAQ,SAAS,iBAAiB,CAAC;CAEtE,OAAO,SAAS,cAAc,OAAO,GAAG,OAAO,KAAK;AACxD"}
1
+ {"version":3,"file":"math.js","names":[],"sources":["../src/math.ts"],"sourcesContent":["import { Decimal } from 'decimal.js';\n\ntype CalculableValue = Decimal.Value | { toString: () => string };\n\n/**\n * Options for configuring the output of `toPercentageString`.\n */\nexport interface ToPercentageStringOptions {\n /**\n * Number of decimal places to include in the result.\n *\n * @default 2\n */\n decimalPlaces?: number;\n\n /**\n * Whether to include the '%' symbol in the result.\n *\n * @default true\n */\n withSymbol?: boolean;\n}\n\n/**\n * Converts a fraction (numerator / denominator) into a percentage string.\n *\n * - Uses `decimal.js` for precise decimal calculations.\n * - Supports custom decimal places and optional percentage symbol.\n * - Returns `'0.00%'` if result is `NaN` or division is invalid.\n *\n * @param {CalculableValue} molecular - The numerator of the fraction\n * @param {CalculableValue} denominator - The denominator of the fraction\n * @param {ToPercentageStringOptions} [options] - Optional output settings\n *\n * @returns {string} Formatted percentage string\n *\n * @example\n * ```typescript\n * import { toPercentageString } from '@kikiutils/shared/math';\n *\n * console.log(toPercentageString(50, 200)); // 25.00%\n * console.log(toPercentageString(50, 200, { withSymbol: false })); // 25.00\n * console.log(toPercentageString(50, 200, { decimalPlaces: 1 })); // 25.0%\n * ```\n */\nexport function toPercentageString(\n molecular: CalculableValue,\n denominator: CalculableValue,\n options?: ToPercentageStringOptions,\n) {\n const molecularDecimal = new Decimal(molecular.toString());\n const denominatorDecimal = new Decimal(denominator.toString());\n const calculationResult = molecularDecimal.div(denominatorDecimal);\n\n const result = calculationResult.isNaN() || !calculationResult.isFinite()\n ? '0.00'\n : calculationResult.times(100).toFixed(options?.decimalPlaces ?? 2);\n\n return options?.withSymbol ?? true ? `${result}%` : result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA6CA,SAAgB,mBACZ,WACA,aACA,SACF;CACE,MAAM,mBAAmB,IAAI,QAAQ,UAAU,SAAS,CAAC;CACzD,MAAM,qBAAqB,IAAI,QAAQ,YAAY,SAAS,CAAC;CAC7D,MAAM,oBAAoB,iBAAiB,IAAI,kBAAkB;CAEjE,MAAM,SAAS,kBAAkB,MAAM,KAAK,CAAC,kBAAkB,SAAS,IAClE,SACA,kBAAkB,MAAM,GAAG,CAAC,CAAC,QAAQ,SAAS,iBAAiB,CAAC;CAEtE,OAAO,SAAS,cAAc,OAAO,GAAG,OAAO,KAAK;AACxD"}
package/dist/number.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { millify } from "millify";
2
-
3
2
  //#region src/number.d.ts
4
3
  /**
5
4
  * Converts a large number into a compact, human-readable string using `millify`.
@@ -1 +1 @@
1
- {"version":3,"file":"number.d.ts","names":[],"sources":["../src/number.ts"],"mappings":";;;;;AAoBA;;;;;;;;;AAA4F;;;;;;;iBAA5E,qBAAA,CAAsB,KAAA,UAAe,OAAA,GAAU,UAAU,QAAQ,OAAA"}
1
+ {"version":3,"file":"number.d.ts","names":[],"sources":["../src/number.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;iBAoBgB,sBAAsB,eAAe,UAAU,kBAAkB"}
@@ -1 +1 @@
1
- {"version":3,"file":"object.d.ts","names":[],"sources":["../src/object.ts"],"mappings":";;AA2BA;;;;;;;;;AAG+B;;;;;;;;;;;;;;;;;iBAHf,gCAAA,CACZ,KAAA,EAAO,MAAM,eACb,WAAA,WACA,aAAA"}
1
+ {"version":3,"file":"object.d.ts","names":[],"sources":["../src/object.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BgB,iCACZ,OAAO,qBACP,sBACA"}
@@ -1 +1 @@
1
- {"version":3,"file":"object.js","names":[],"sources":["../src/object.ts"],"sourcesContent":["/**\n * Serializes a nested object into a deterministic, flat string format.\n *\n * This function recursively traverses the input object (including nested objects and arrays),\n * flattens it into key paths using dot notation (e.g. \"a.b.0.c\"), sorts all keys,\n * and joins each key-value pair into a string with customizable separators.\n *\n * It is designed for use cases such as signature generation, cache key construction,\n * or any context requiring consistent and predictable object serialization.\n *\n * Note: Empty objects and arrays produce an empty string, which is useful for\n * generating deterministic signature payloads.\n *\n * @param {Record<string, any>} input - The object to serialize. Can contain nested objects and arrays\n * @param {string} kvSeparator - The string used to separate each key from its value (default: '=')\n * @param {string} pairSeparator - The string used to separate each key-value pair (default: '&')\n * @returns {string} A deterministic string representation of the input object\n *\n * @example\n * ```typescript\n * import { stringifyObjectDeterministically } from '@kikiutils/shared/object';\n *\n * console.log(stringifyObjectDeterministically({ b: 2, a: { x: 1, y: [3, 4] } })); // a.x=1&a.y.0=3&a.y.1=4&b=2\n * console.log(stringifyObjectDeterministically({ foo: 'bar' }, ':', '|')); // foo:bar\n * console.log(stringifyObjectDeterministically({})); // ''\n * ```\n */\nexport function stringifyObjectDeterministically(\n input: Record<string, any>,\n kvSeparator: string = '=',\n pairSeparator: string = '&',\n) {\n const entries: string[] = [];\n\n function walk(object: any, path: string[] = []) {\n if (Array.isArray(object)) {\n object.forEach((value, i) => {\n walk(\n value,\n [\n ...path,\n i.toString(),\n ],\n );\n });\n } else if (\n object !== null\n && typeof object === 'object'\n && Object.prototype.toString.call(object) === '[object Object]'\n ) {\n Object.keys(object).sort().forEach((key) => {\n walk(\n object[key],\n [\n ...path,\n key,\n ],\n );\n });\n } else entries.push(`${path.join('.')}${kvSeparator}${String(object)}`);\n }\n\n walk(input);\n return entries.sort().join(pairSeparator);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAgB,iCACZ,OACA,cAAsB,KACtB,gBAAwB,KAC1B;CACE,MAAM,UAAoB,CAAC;CAE3B,SAAS,KAAK,QAAa,OAAiB,CAAC,GAAG;EAC5C,IAAI,MAAM,QAAQ,MAAM,GACpB,OAAO,SAAS,OAAO,MAAM;GACzB,KACI,OACA,CACI,GAAG,MACH,EAAE,SAAS,CACf,CACJ;EACJ,CAAC;OACE,IACH,WAAW,QACR,OAAO,WAAW,YAClB,OAAO,UAAU,SAAS,KAAK,MAAM,MAAM,mBAE9C,OAAO,KAAK,MAAM,EAAE,KAAK,EAAE,SAAS,QAAQ;GACxC,KACI,OAAO,MACP,CACI,GAAG,MACH,GACJ,CACJ;EACJ,CAAC;OACE,QAAQ,KAAK,GAAG,KAAK,KAAK,GAAG,IAAI,cAAc,OAAO,MAAM,GAAG;CAC1E;CAEA,KAAK,KAAK;CACV,OAAO,QAAQ,KAAK,EAAE,KAAK,aAAa;AAC5C"}
1
+ {"version":3,"file":"object.js","names":[],"sources":["../src/object.ts"],"sourcesContent":["/**\n * Serializes a nested object into a deterministic, flat string format.\n *\n * This function recursively traverses the input object (including nested objects and arrays),\n * flattens it into key paths using dot notation (e.g. \"a.b.0.c\"), sorts all keys,\n * and joins each key-value pair into a string with customizable separators.\n *\n * It is designed for use cases such as signature generation, cache key construction,\n * or any context requiring consistent and predictable object serialization.\n *\n * Note: Empty objects and arrays produce an empty string, which is useful for\n * generating deterministic signature payloads.\n *\n * @param {Record<string, any>} input - The object to serialize. Can contain nested objects and arrays\n * @param {string} kvSeparator - The string used to separate each key from its value (default: '=')\n * @param {string} pairSeparator - The string used to separate each key-value pair (default: '&')\n * @returns {string} A deterministic string representation of the input object\n *\n * @example\n * ```typescript\n * import { stringifyObjectDeterministically } from '@kikiutils/shared/object';\n *\n * console.log(stringifyObjectDeterministically({ b: 2, a: { x: 1, y: [3, 4] } })); // a.x=1&a.y.0=3&a.y.1=4&b=2\n * console.log(stringifyObjectDeterministically({ foo: 'bar' }, ':', '|')); // foo:bar\n * console.log(stringifyObjectDeterministically({})); // ''\n * ```\n */\nexport function stringifyObjectDeterministically(\n input: Record<string, any>,\n kvSeparator: string = '=',\n pairSeparator: string = '&',\n) {\n const entries: string[] = [];\n\n function walk(object: any, path: string[] = []) {\n if (Array.isArray(object)) {\n object.forEach((value, i) => {\n walk(\n value,\n [\n ...path,\n i.toString(),\n ],\n );\n });\n } else if (\n object !== null\n && typeof object === 'object'\n && Object.prototype.toString.call(object) === '[object Object]'\n ) {\n Object.keys(object).sort().forEach((key) => {\n walk(\n object[key],\n [\n ...path,\n key,\n ],\n );\n });\n } else entries.push(`${path.join('.')}${kvSeparator}${String(object)}`);\n }\n\n walk(input);\n return entries.sort().join(pairSeparator);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAgB,iCACZ,OACA,cAAsB,KACtB,gBAAwB,KAC1B;CACE,MAAM,UAAoB,CAAC;CAE3B,SAAS,KAAK,QAAa,OAAiB,CAAC,GAAG;EAC5C,IAAI,MAAM,QAAQ,MAAM,GACpB,OAAO,SAAS,OAAO,MAAM;GACzB,KACI,OACA,CACI,GAAG,MACH,EAAE,SAAS,CACf,CACJ;EACJ,CAAC;OACE,IACH,WAAW,QACR,OAAO,WAAW,YAClB,OAAO,UAAU,SAAS,KAAK,MAAM,MAAM,mBAE9C,OAAO,KAAK,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,QAAQ;GACxC,KACI,OAAO,MACP,CACI,GAAG,MACH,GACJ,CACJ;EACJ,CAAC;OACE,QAAQ,KAAK,GAAG,KAAK,KAAK,GAAG,IAAI,cAAc,OAAO,MAAM,GAAG;CAC1E;CAEA,KAAK,KAAK;CACV,OAAO,QAAQ,KAAK,CAAC,CAAC,KAAK,aAAa;AAC5C"}
package/dist/pino.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- import * as _$pino from "pino";
2
-
3
1
  //#region src/pino.d.ts
4
2
  /**
5
3
  * A pino logger instance with the configured stream.
@@ -22,8 +20,8 @@ import * as _$pino from "pino";
22
20
  * logger.level = 'info';
23
21
  * ```
24
22
  */
25
- declare const pinoLogger: _$pino.Logger<never, boolean>;
26
- declare const logger: _$pino.Logger<never, boolean>;
23
+ declare const pinoLogger: import("pino").Logger<never, boolean>;
24
+ declare const logger: import("pino").Logger<never, boolean>;
27
25
  //#endregion
28
26
  export { logger, pinoLogger };
29
27
  //# sourceMappingURL=pino.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pino.d.ts","names":[],"sources":["../src/pino.ts"],"mappings":";;;;;;AAiCA;;;;AAAuB;AACvB;;;;AAAmB;;;;;;;;;cADN,UAAA,EAA6B,MAAA,CAAnB,MAAA;AAAA,cACV,MAAA,EAAmB,MAAA,CAAb,MAAA"}
1
+ {"version":3,"file":"pino.d.ts","names":[],"sources":["../src/pino.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;cAiCa,2BAAU;cACV,uBAAM"}
package/dist/pino.js CHANGED
@@ -1,5 +1,14 @@
1
1
  import { pino } from "pino";
2
2
  import { PinoPretty } from "pino-pretty";
3
+ //#region src/pino.ts
4
+ /**
5
+ * Configure pinoPretty to enhance the log output.
6
+ */
7
+ const stream = PinoPretty({
8
+ colorize: true,
9
+ ignore: "hostname,pid",
10
+ translateTime: "SYS:yyyy-mm-dd HH:MM:ss.l"
11
+ });
3
12
  /**
4
13
  * A pino logger instance with the configured stream.
5
14
  *
@@ -21,11 +30,7 @@ import { PinoPretty } from "pino-pretty";
21
30
  * logger.level = 'info';
22
31
  * ```
23
32
  */
24
- const pinoLogger = pino({}, PinoPretty({
25
- colorize: true,
26
- ignore: "hostname,pid",
27
- translateTime: "SYS:yyyy-mm-dd HH:MM:ss.l"
28
- }));
33
+ const pinoLogger = pino({}, stream);
29
34
  const logger = pinoLogger;
30
35
  pinoLogger.level = process.env.PINO_LOGGER_LEVEL || (process.env.NODE_ENV === "production" ? "error" : pinoLogger.level);
31
36
  //#endregion
package/dist/pino.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pino.js","names":[],"sources":["../src/pino.ts"],"sourcesContent":["import { pino } from 'pino';\nimport { PinoPretty } from 'pino-pretty';\n\n/**\n * Configure pinoPretty to enhance the log output.\n */\nconst stream = PinoPretty({\n colorize: true, // Enable colored output for better readability\n ignore: 'hostname,pid', // Exclude 'hostname' and 'pid' fields from the logs\n translateTime: 'SYS:yyyy-mm-dd HH:MM:ss.l', // Format the timestamp in 'yyyy-mm-dd HH:MM:ss.l' format\n});\n\n/**\n * A pino logger instance with the configured stream.\n *\n * The logger's level is determined based on the `PINO_LOGGER_LEVEL` and `NODE_ENV` environment variables.\n * If `PINO_LOGGER_LEVEL` is set, it will be used; otherwise, if `NODE_ENV` is `production`,\n * the level will be set to `error`.\n *\n * To manually change the level, assign the desired level to `logger.level`.\n *\n * See available levels [here](https://getpino.io/#/docs/api?id=level-string).\n *\n * @example\n * ```typescript\n * import { logger } from '@kikiutils/shared/pino';\n *\n * logger.info('test'); // [2024-07-11 12:12:30.085] INFO: test\n *\n * // Manually change the level\n * logger.level = 'info';\n * ```\n */\nexport const pinoLogger = pino({}, stream);\nexport const logger = pinoLogger;\n// eslint-disable-next-line style/max-len\npinoLogger.level = process.env.PINO_LOGGER_LEVEL || (process.env.NODE_ENV === 'production' ? 'error' : pinoLogger.level);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAa,aAAa,KAAK,CAAC,GA3BjB,WAAW;CACtB,UAAU;CACV,QAAQ;CACR,eAAe;AACnB,CAuBmC,CAAM;AACzC,MAAa,SAAS;AAEtB,WAAW,QAAQ,QAAQ,IAAI,sBAAsB,QAAQ,IAAI,aAAa,eAAe,UAAU,WAAW"}
1
+ {"version":3,"file":"pino.js","names":[],"sources":["../src/pino.ts"],"sourcesContent":["import { pino } from 'pino';\nimport { PinoPretty } from 'pino-pretty';\n\n/**\n * Configure pinoPretty to enhance the log output.\n */\nconst stream = PinoPretty({\n colorize: true, // Enable colored output for better readability\n ignore: 'hostname,pid', // Exclude 'hostname' and 'pid' fields from the logs\n translateTime: 'SYS:yyyy-mm-dd HH:MM:ss.l', // Format the timestamp in 'yyyy-mm-dd HH:MM:ss.l' format\n});\n\n/**\n * A pino logger instance with the configured stream.\n *\n * The logger's level is determined based on the `PINO_LOGGER_LEVEL` and `NODE_ENV` environment variables.\n * If `PINO_LOGGER_LEVEL` is set, it will be used; otherwise, if `NODE_ENV` is `production`,\n * the level will be set to `error`.\n *\n * To manually change the level, assign the desired level to `logger.level`.\n *\n * See available levels [here](https://getpino.io/#/docs/api?id=level-string).\n *\n * @example\n * ```typescript\n * import { logger } from '@kikiutils/shared/pino';\n *\n * logger.info('test'); // [2024-07-11 12:12:30.085] INFO: test\n *\n * // Manually change the level\n * logger.level = 'info';\n * ```\n */\nexport const pinoLogger = pino({}, stream);\nexport const logger = pinoLogger;\n// eslint-disable-next-line style/max-len\npinoLogger.level = process.env.PINO_LOGGER_LEVEL || (process.env.NODE_ENV === 'production' ? 'error' : pinoLogger.level);\n"],"mappings":";;;;;;AAMA,MAAM,SAAS,WAAW;CACtB,UAAU;CACV,QAAQ;CACR,eAAe;AACnB,CAAC;;;;;;;;;;;;;;;;;;;;;;AAuBD,MAAa,aAAa,KAAK,CAAC,GAAG,MAAM;AACzC,MAAa,SAAS;AAEtB,WAAW,QAAQ,QAAQ,IAAI,sBAAsB,QAAQ,IAAI,aAAa,eAAe,UAAU,WAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"random.d.ts","names":[],"sources":["../src/random.ts"],"mappings":";;AAoBA;;;;;;;;;;;;;;AAKkB;;;;;iBALF,8BAAA,YAAA,CACZ,SAAA,GAAY,MAAA,aAAmB,CAAA,EAC/B,MAAA,UACA,MAAA,UACA,MAAA,UACA,MAAA,WAAc,CAAA"}
1
+ {"version":3,"file":"random.d.ts","names":[],"sources":["../src/random.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;iBAoBgB,+BAA+B,YAC3C,YAAY,mBAAmB,GAC/B,gBACA,gBACA,gBACA,iBAAc"}
@@ -1,5 +1,4 @@
1
1
  import { LRUCache } from "lru-cache";
2
-
3
2
  //#region src/storages/lru/keyed-store.d.ts
4
3
  /**
5
4
  * Creates a keyed store wrapper around an LRU cache instance.
@@ -1 +1 @@
1
- {"version":3,"file":"keyed-store.d.ts","names":[],"sources":["../../../src/storages/lru/keyed-store.ts"],"mappings":";;;;;AAwBA;;;;;;;;;;;;;;;;;;;;iBAAgB,mBAAA,aAAA,CAAiC,WAAA,EAAa,QAAA,oCACjC,KAAA,MAAW,IAAA,EAAM,CAAA,gBAAY,QAAA;EAA9C;;;;;mBAMa,CAAA,GAAC,WAAA,CAAA,CAAA;wBAII,CAAA;qBACH,CAAA;wBACG,CAAA;EANJ;;;wBAUI,CAAA;mBACL,CAAA,KAAC,IAAA,EAAW,CAAA,KAAC,QAAA;AAAA"}
1
+ {"version":3,"file":"keyed-store.d.ts","names":[],"sources":["../../../src/storages/lru/keyed-store.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;iBAwBgB,oBAAoB,aAAa,aAAa,2BAClD,iBAAiB,WAAW,MAAM,iBAAY;;;;;;EAMjC,WAAA,MAAA,IAAC,YAAA;EAII,gBAAA,MAAA;EACH,aAAA,MAAA;EACG,gBAAA,MAAA;;;;EAIA,gBAAA,MAAA;EACL,UAAA,OAAA,MAAC,MAAW,MAAC"}
@@ -1,6 +1,5 @@
1
- import { MaybeReadonly, Nullable } from "../../types/index.js";
1
+ import { MaybeReadonly } from "../../types/index.js";
2
2
  import { RedisLikeStorage } from "./types.js";
3
-
4
3
  //#region src/storages/redis/keyed-store.d.ts
5
4
  /**
6
5
  * Creates a keyed store wrapper around a Redis-like storage.
@@ -28,7 +27,7 @@ import { RedisLikeStorage } from "./types.js";
28
27
  * ```
29
28
  */
30
29
  declare function createRedisKeyedStore<D = unknown>(storage: MaybeReadonly<RedisLikeStorage>): <P extends any[]>(keyFn: (...args: P) => string) => Readonly<{
31
- getItem: (...args: P) => Promise<Nullable<D>>;
30
+ getItem: (...args: P) => Promise<D | null>;
32
31
  getItemTtl: (...args: P) => Promise<number>;
33
32
  hasItem: (...args: P) => Promise<boolean>;
34
33
  removeItem: (...args: P) => Promise<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"keyed-store.d.ts","names":[],"sources":["../../../src/storages/redis/keyed-store.ts"],"mappings":";;;;;;AA6BA;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,qBAAA,aAAA,CAAmC,OAAA,EAAS,aAAA,CAAc,gBAAA,sBAC7C,KAAA,MAAW,IAAA,EAAM,CAAA,gBAAY,QAAA;qBAC/B,CAAA,KAAC,OAAA,CAAA,QAAA,CAAA,CAAA;wBACE,CAAA,KAAC,OAAA;qBACJ,CAAA,KAAC,OAAA;wBACE,CAAA,KAAC,OAAA;wBACD,CAAA;mBACL,CAAA,KAAC,IAAA,EAAW,CAAA,KAAC,OAAA;qCACG,KAAA,EAAS,CAAA,KAAC,IAAA,EAAW,CAAA,GAAC,OAAA;AAAA"}
1
+ {"version":3,"file":"keyed-store.d.ts","names":[],"sources":["../../../src/storages/redis/keyed-store.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BgB,sBAAsB,aAAa,SAAS,cAAc,qBAC9D,iBAAiB,WAAW,MAAM,iBAAY;EAC/B,aAAA,MAAA,MAAC,QAAA;EACE,gBAAA,MAAA,MAAC;EACJ,aAAA,MAAA,MAAC;EACE,gBAAA,MAAA,MAAC;EACD,gBAAA,MAAA;EACL,UAAA,OAAA,MAAC,MAAW,MAAC;EACH,eAAA,oBAAM,OAAS,MAAC,MAAW,IAAC"}
@@ -1,5 +1,4 @@
1
1
  import { RedisLikeAdapter, RedisLikeStorage } from "./types.js";
2
-
3
2
  //#region src/storages/redis/msgpack.d.ts
4
3
  /**
5
4
  * Creates a Redis-like storage using msgpack serialization.
@@ -1 +1 @@
1
- {"version":3,"file":"msgpack.d.ts","names":[],"sources":["../../../src/storages/redis/msgpack.ts"],"mappings":";;;;;AAmCA;;;;;;;;;;;;;AAA+F;;;;;iBAA/E,yBAAA,CAA0B,OAAA,EAAS,gBAAA,GAAmB,QAAA,CAAS,gBAAA"}
1
+ {"version":3,"file":"msgpack.d.ts","names":[],"sources":["../../../src/storages/redis/msgpack.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;iBAmCgB,0BAA0B,SAAS,mBAAmB,SAAS"}
@@ -1,5 +1,3 @@
1
- import { Nullable } from "../../types/index.js";
2
-
3
1
  //#region src/storages/redis/types.d.ts
4
2
  /**
5
3
  * Low-level Redis-like adapter interface for raw buffer operations.
@@ -12,7 +10,7 @@ interface RedisLikeAdapter {
12
10
  /**
13
11
  * Gets the raw buffer value for a key.
14
12
  */
15
- getBuffer: (key: string) => Promise<Nullable<Uint8Array>>;
13
+ getBuffer: (key: string) => Promise<null | Uint8Array>;
16
14
  /**
17
15
  * Checks if a key exists.
18
16
  */
@@ -37,7 +35,7 @@ interface RedisLikeStorage {
37
35
  /**
38
36
  * Gets a deserialized value by key.
39
37
  */
40
- getItem: <T = unknown>(key: string) => Promise<Nullable<T>>;
38
+ getItem: <T = unknown>(key: string) => Promise<null | T>;
41
39
  /**
42
40
  * Gets the TTL of a key in seconds.
43
41
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/storages/redis/types.ts"],"mappings":";;;;;AAKA;UAAiB,gBAAA;;;;EAIb,MAAA,GAAS,GAAA,aAAgB,OAAA;EAKG;;;EAA5B,SAAA,GAAY,GAAA,aAAgB,OAAA,CAAQ,QAAA,CAAS,UAAA;EAeS;;;EAVtD,GAAA,GAAM,GAAA,aAAgB,OAAA;EAeO;;;EAV7B,SAAA,GAAY,GAAA,UAAa,KAAA,EAAO,UAAA,KAAe,OAAA;EAV/C;;;EAeA,WAAA,GAAc,GAAA,UAAa,UAAA,UAAoB,KAAA,EAAO,UAAA,KAAe,OAAA;EAfxB;;;EAoB7C,GAAA,GAAM,GAAA,aAAgB,OAAA;AAAA;;;;UAMT,gBAAA;EAXb;;;EAeA,OAAA,gBAAuB,GAAA,aAAgB,OAAA,CAAQ,QAAA,CAAS,CAAA;EAfT;;;EAoB/C,UAAA,GAAa,GAAA,aAAgB,OAAA;EAfP;;AAAO;EAoB7B,OAAA,GAAU,GAAA,aAAgB,OAAA;EAdG;;;EAmB7B,UAAA,GAAa,GAAA,aAAgB,OAAA;EAfU;;;EAoBvC,OAAA,GAAU,GAAA,UAAa,KAAA,UAAe,OAAA;EAAA;;;EAKtC,cAAA,GAAiB,GAAA,UAAa,UAAA,UAAoB,KAAA,UAAe,OAAA;AAAA"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/storages/redis/types.ts"],"mappings":";;;;UAGiB;;;;EAIb,SAAS,gBAAgB;;;;EAKzB,YAAY,gBAAgB,eAAe;;;;EAK3C,MAAM,gBAAgB;;;;EAKtB,YAAY,aAAa,OAAO,eAAe;;;;EAK/C,cAAc,aAAa,oBAAoB,OAAO,eAAe;;;;EAKrE,MAAM,gBAAgB;;;;;UAMT;;;;EAIb,UAAU,aAAa,gBAAgB,eAAe;;;;EAKtD,aAAa,gBAAgB;;;;EAK7B,UAAU,gBAAgB;;;;EAK1B,aAAa,gBAAgB;;;;EAK7B,UAAU,aAAa,eAAe;;;;EAKtC,iBAAiB,aAAa,oBAAoB,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"string.d.ts","names":[],"sources":["../src/string.ts"],"mappings":";;AAGA;;KAAY,gBAAA;;AAAgB;AA4C5B;;;;;;;;AAAkF;;;;;;;;;;;;iBAAlE,YAAA,CAAa,MAAA,UAAgB,IAAA,GAAM,gBAA+B"}
1
+ {"version":3,"file":"string.d.ts","names":[],"sources":["../src/string.ts"],"mappings":";;;;KAGY;;;;;;;;;;;;;;;;;;;;;;;iBA4CI,aAAa,gBAAgB,OAAM"}
package/dist/string.js CHANGED
@@ -1,15 +1,12 @@
1
1
  //#region src/string.ts
2
- const DIGITS = "0123456789";
3
- const LOWERCASE = "abcdefghijklmnopqrstuvwxyz";
4
- const UPPERCASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
5
2
  const CHARSETS = {
6
- "alphabetic": LOWERCASE + UPPERCASE,
7
- "alphanumeric": DIGITS + LOWERCASE + UPPERCASE,
8
- "lowercase": LOWERCASE,
9
- "lowercase-numeric": DIGITS + LOWERCASE,
10
- "numeric": DIGITS,
11
- "uppercase": UPPERCASE,
12
- "uppercase-numeric": DIGITS + UPPERCASE
3
+ "alphabetic": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
4
+ "alphanumeric": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
5
+ "lowercase": "abcdefghijklmnopqrstuvwxyz",
6
+ "lowercase-numeric": "0123456789abcdefghijklmnopqrstuvwxyz",
7
+ "numeric": "0123456789",
8
+ "uppercase": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
9
+ "uppercase-numeric": "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
13
10
  };
14
11
  /**
15
12
  * Generates a random string of a given length using a predefined character set.
@@ -1 +1 @@
1
- {"version":3,"file":"string.js","names":[],"sources":["../src/string.ts"],"sourcesContent":["/**\n * Character-set presets supported by `randomString`.\n */\nexport type RandomStringMode =\n | 'alphabetic'\n | 'alphanumeric'\n | 'lowercase'\n | 'lowercase-numeric'\n | 'numeric'\n | 'uppercase'\n | 'uppercase-numeric';\n\nconst DIGITS = '0123456789';\nconst LOWERCASE = 'abcdefghijklmnopqrstuvwxyz';\nconst UPPERCASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nconst CHARSETS: Record<RandomStringMode, string> = {\n 'alphabetic': LOWERCASE + UPPERCASE,\n 'alphanumeric': DIGITS + LOWERCASE + UPPERCASE,\n 'lowercase': LOWERCASE,\n 'lowercase-numeric': DIGITS + LOWERCASE,\n 'numeric': DIGITS,\n 'uppercase': UPPERCASE,\n 'uppercase-numeric': DIGITS + UPPERCASE,\n};\n\n/**\n * Generates a random string of a given length using a predefined character set.\n *\n * Uses `Math.random`, so this helper is suitable for display tokens, placeholders,\n * and test data, but not for passwords, API keys, or other cryptographic secrets.\n *\n * @param {number} length - The positive integer length of the string to generate\n * @param {RandomStringMode} [mode] - The character set to use (default: `'alphabetic'`)\n *\n * @returns {string} The generated random string\n *\n * @throws {Error} If the length is not a positive integer or the mode is unsupported\n *\n * @example\n * ```typescript\n * import { randomString } from '@kikiutils/shared/string';\n *\n * randomString(8); // e.g. 'aZbXwTyQ'\n * randomString(6, 'numeric'); // e.g. '402398'\n * randomString(10, 'alphanumeric'); // e.g. 'a9Z4pQ8xY2'\n * ```\n */\nexport function randomString(length: number, mode: RandomStringMode = 'alphabetic') {\n if (!Number.isInteger(length) || length <= 0) {\n throw new Error(`Invalid length: ${length}. Must be a positive integer`);\n }\n\n const charset = CHARSETS[mode];\n if (!charset) throw new Error(`Unsupported mode: ${mode}`);\n return Array.from({ length }, () => charset[Math.floor(Math.random() * charset.length)]).join('');\n}\n"],"mappings":";AAYA,MAAM,SAAS;AACf,MAAM,YAAY;AAClB,MAAM,YAAY;AAClB,MAAM,WAA6C;CAC/C,cAAc,YAAY;CAC1B,gBAAgB,SAAS,YAAY;CACrC,aAAa;CACb,qBAAqB,SAAS;CAC9B,WAAW;CACX,aAAa;CACb,qBAAqB,SAAS;AAClC;;;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAgB,aAAa,QAAgB,OAAyB,cAAc;CAChF,IAAI,CAAC,OAAO,UAAU,MAAM,KAAK,UAAU,GACvC,MAAM,IAAI,MAAM,mBAAmB,OAAO,6BAA6B;CAG3E,MAAM,UAAU,SAAS;CACzB,IAAI,CAAC,SAAS,MAAM,IAAI,MAAM,qBAAqB,MAAM;CACzD,OAAO,MAAM,KAAK,EAAE,OAAO,SAAS,QAAQ,KAAK,MAAM,KAAK,OAAO,IAAI,QAAQ,MAAM,EAAE,EAAE,KAAK,EAAE;AACpG"}
1
+ {"version":3,"file":"string.js","names":[],"sources":["../src/string.ts"],"sourcesContent":["/**\n * Character-set presets supported by `randomString`.\n */\nexport type RandomStringMode =\n | 'alphabetic'\n | 'alphanumeric'\n | 'lowercase'\n | 'lowercase-numeric'\n | 'numeric'\n | 'uppercase'\n | 'uppercase-numeric';\n\nconst DIGITS = '0123456789';\nconst LOWERCASE = 'abcdefghijklmnopqrstuvwxyz';\nconst UPPERCASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nconst CHARSETS: Record<RandomStringMode, string> = {\n 'alphabetic': LOWERCASE + UPPERCASE,\n 'alphanumeric': DIGITS + LOWERCASE + UPPERCASE,\n 'lowercase': LOWERCASE,\n 'lowercase-numeric': DIGITS + LOWERCASE,\n 'numeric': DIGITS,\n 'uppercase': UPPERCASE,\n 'uppercase-numeric': DIGITS + UPPERCASE,\n};\n\n/**\n * Generates a random string of a given length using a predefined character set.\n *\n * Uses `Math.random`, so this helper is suitable for display tokens, placeholders,\n * and test data, but not for passwords, API keys, or other cryptographic secrets.\n *\n * @param {number} length - The positive integer length of the string to generate\n * @param {RandomStringMode} [mode] - The character set to use (default: `'alphabetic'`)\n *\n * @returns {string} The generated random string\n *\n * @throws {Error} If the length is not a positive integer or the mode is unsupported\n *\n * @example\n * ```typescript\n * import { randomString } from '@kikiutils/shared/string';\n *\n * randomString(8); // e.g. 'aZbXwTyQ'\n * randomString(6, 'numeric'); // e.g. '402398'\n * randomString(10, 'alphanumeric'); // e.g. 'a9Z4pQ8xY2'\n * ```\n */\nexport function randomString(length: number, mode: RandomStringMode = 'alphabetic') {\n if (!Number.isInteger(length) || length <= 0) {\n throw new Error(`Invalid length: ${length}. Must be a positive integer`);\n }\n\n const charset = CHARSETS[mode];\n if (!charset) throw new Error(`Unsupported mode: ${mode}`);\n return Array.from({ length }, () => charset[Math.floor(Math.random() * charset.length)]).join('');\n}\n"],"mappings":";AAeA,MAAM,WAA6C;CAC/C,cAAc;CACd,gBAAgB;CAChB,aAAa;CACb,qBAAqB;CACrB,WAAW;CACX,aAAa;CACb,qBAAqB;AACzB;;;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAgB,aAAa,QAAgB,OAAyB,cAAc;CAChF,IAAI,CAAC,OAAO,UAAU,MAAM,KAAK,UAAU,GACvC,MAAM,IAAI,MAAM,mBAAmB,OAAO,6BAA6B;CAG3E,MAAM,UAAU,SAAS;CACzB,IAAI,CAAC,SAAS,MAAM,IAAI,MAAM,qBAAqB,MAAM;CACzD,OAAO,MAAM,KAAK,EAAE,OAAO,SAAS,QAAQ,KAAK,MAAM,KAAK,OAAO,IAAI,QAAQ,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE;AACpG"}
package/dist/time.d.ts CHANGED
@@ -1,22 +1,44 @@
1
1
  //#region src/time.d.ts
2
2
  /**
3
- * Creates a delay that can be aborted via AbortSignal.
3
+ * Delays execution until the specified duration elapses or the signal is aborted.
4
+ *
5
+ * Aborting the signal resolves the promise normally without throwing.
6
+ *
7
+ * @param {number} ms - Delay duration in milliseconds
8
+ * @param {AbortSignal} [signal] - Optional signal used to end the delay early
9
+ *
10
+ * @returns {Promise<void>} Resolves when the delay completes or the signal is aborted
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * import { delay } from '@kikiutils/shared/time';
15
+ *
16
+ * const controller = new AbortController();
17
+ * setTimeout(() => controller.abort(), 1000);
18
+ * await delay(5000, controller.signal); // resolves after ~1s
19
+ * ```
20
+ */
21
+ declare function delay(ms: number, signal?: AbortSignal): Promise<void>;
22
+ /**
23
+ * Delays execution until the specified duration elapses or the signal is aborted.
24
+ *
25
+ * Aborting the signal rejects the promise with the signal's abort reason.
4
26
  *
5
27
  * @param {number} ms - Delay duration in milliseconds
6
- * @param {AbortSignal} [signal] - Optional AbortSignal to cancel the delay
28
+ * @param {AbortSignal} [signal] - Optional signal used to abort the delay
7
29
  *
8
- * @returns {Promise<undefined>} A promise that resolves after ms or resolves immediately on abort
30
+ * @returns {Promise<void>} Resolves when the delay completes or rejects when the signal is aborted
9
31
  *
10
32
  * @example
11
33
  * ```typescript
12
- * import { abortableDelay } from '@kikiutils/shared/time';
34
+ * import { delayOrThrow } from '@kikiutils/shared/time';
13
35
  *
14
36
  * const controller = new AbortController();
15
37
  * setTimeout(() => controller.abort(), 1000);
16
- * await abortableDelay(5000, controller.signal); // resolves after ~1s when aborted
38
+ * await delayOrThrow(5000, controller.signal); // rejects after ~1s
17
39
  * ```
18
40
  */
19
- declare function abortableDelay(ms: number, signal?: AbortSignal): Promise<unknown>;
41
+ declare function delayOrThrow(ms: number, signal?: AbortSignal): Promise<void>;
20
42
  //#endregion
21
- export { abortableDelay };
43
+ export { delay, delayOrThrow };
22
44
  //# sourceMappingURL=time.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"time.d.ts","names":[],"sources":["../src/time.ts"],"mappings":";;AAiBA;;;;;;;;;AAA+D;;;;;;;iBAA/C,cAAA,CAAe,EAAA,UAAY,MAAA,GAAS,WAAA,GAAW,OAAA"}
1
+ {"version":3,"file":"time.d.ts","names":[],"sources":["../src/time.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;iBAmBgB,MAAM,YAAY,SAAS,cAAc;;;;;;;;;;;;;;;;;;;;iBAsCzC,aAAa,YAAY,SAAS,cAAc"}
package/dist/time.js CHANGED
@@ -1,31 +1,75 @@
1
1
  //#region src/time.ts
2
2
  /**
3
- * Creates a delay that can be aborted via AbortSignal.
3
+ * Delays execution until the specified duration elapses or the signal is aborted.
4
+ *
5
+ * Aborting the signal resolves the promise normally without throwing.
4
6
  *
5
7
  * @param {number} ms - Delay duration in milliseconds
6
- * @param {AbortSignal} [signal] - Optional AbortSignal to cancel the delay
8
+ * @param {AbortSignal} [signal] - Optional signal used to end the delay early
7
9
  *
8
- * @returns {Promise<undefined>} A promise that resolves after ms or resolves immediately on abort
10
+ * @returns {Promise<void>} Resolves when the delay completes or the signal is aborted
9
11
  *
10
12
  * @example
11
13
  * ```typescript
12
- * import { abortableDelay } from '@kikiutils/shared/time';
14
+ * import { delay } from '@kikiutils/shared/time';
13
15
  *
14
16
  * const controller = new AbortController();
15
17
  * setTimeout(() => controller.abort(), 1000);
16
- * await abortableDelay(5000, controller.signal); // resolves after ~1s when aborted
18
+ * await delay(5000, controller.signal); // resolves after ~1s
17
19
  * ```
18
20
  */
19
- function abortableDelay(ms, signal) {
21
+ function delay(ms, signal) {
20
22
  return new Promise((resolve) => {
21
- const timeout = setTimeout(resolve, ms);
22
- if (signal) signal.addEventListener("abort", () => {
23
+ if (signal?.aborted) {
24
+ resolve();
25
+ return;
26
+ }
27
+ const done = () => {
28
+ clearTimeout(timeout);
29
+ signal?.removeEventListener("abort", done);
30
+ resolve();
31
+ };
32
+ const timeout = setTimeout(done, ms);
33
+ signal?.addEventListener("abort", done, { once: true });
34
+ });
35
+ }
36
+ /**
37
+ * Delays execution until the specified duration elapses or the signal is aborted.
38
+ *
39
+ * Aborting the signal rejects the promise with the signal's abort reason.
40
+ *
41
+ * @param {number} ms - Delay duration in milliseconds
42
+ * @param {AbortSignal} [signal] - Optional signal used to abort the delay
43
+ *
44
+ * @returns {Promise<void>} Resolves when the delay completes or rejects when the signal is aborted
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * import { delayOrThrow } from '@kikiutils/shared/time';
49
+ *
50
+ * const controller = new AbortController();
51
+ * setTimeout(() => controller.abort(), 1000);
52
+ * await delayOrThrow(5000, controller.signal); // rejects after ~1s
53
+ * ```
54
+ */
55
+ function delayOrThrow(ms, signal) {
56
+ return new Promise((resolve, reject) => {
57
+ if (signal?.aborted) {
58
+ reject(signal.reason);
59
+ return;
60
+ }
61
+ const onAbort = () => {
23
62
  clearTimeout(timeout);
24
- resolve(void 0);
25
- });
63
+ reject(signal.reason);
64
+ };
65
+ const timeout = setTimeout(() => {
66
+ signal?.removeEventListener("abort", onAbort);
67
+ resolve();
68
+ }, ms);
69
+ signal?.addEventListener("abort", onAbort, { once: true });
26
70
  });
27
71
  }
28
72
  //#endregion
29
- export { abortableDelay };
73
+ export { delay, delayOrThrow };
30
74
 
31
75
  //# sourceMappingURL=time.js.map
package/dist/time.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"time.js","names":[],"sources":["../src/time.ts"],"sourcesContent":["/**\n * Creates a delay that can be aborted via AbortSignal.\n *\n * @param {number} ms - Delay duration in milliseconds\n * @param {AbortSignal} [signal] - Optional AbortSignal to cancel the delay\n *\n * @returns {Promise<undefined>} A promise that resolves after ms or resolves immediately on abort\n *\n * @example\n * ```typescript\n * import { abortableDelay } from '@kikiutils/shared/time';\n *\n * const controller = new AbortController();\n * setTimeout(() => controller.abort(), 1000);\n * await abortableDelay(5000, controller.signal); // resolves after ~1s when aborted\n * ```\n */\nexport function abortableDelay(ms: number, signal?: AbortSignal) {\n return new Promise((resolve) => {\n const timeout = setTimeout(resolve, ms);\n if (signal) {\n signal.addEventListener(\n 'abort',\n () => {\n clearTimeout(timeout);\n resolve(undefined);\n },\n );\n }\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,SAAgB,eAAe,IAAY,QAAsB;CAC7D,OAAO,IAAI,SAAS,YAAY;EAC5B,MAAM,UAAU,WAAW,SAAS,EAAE;EACtC,IAAI,QACA,OAAO,iBACH,eACM;GACF,aAAa,OAAO;GACpB,QAAQ,KAAA,CAAS;EACrB,CACJ;CAER,CAAC;AACL"}
1
+ {"version":3,"file":"time.js","names":[],"sources":["../src/time.ts"],"sourcesContent":["/**\n * Delays execution until the specified duration elapses or the signal is aborted.\n *\n * Aborting the signal resolves the promise normally without throwing.\n *\n * @param {number} ms - Delay duration in milliseconds\n * @param {AbortSignal} [signal] - Optional signal used to end the delay early\n *\n * @returns {Promise<void>} Resolves when the delay completes or the signal is aborted\n *\n * @example\n * ```typescript\n * import { delay } from '@kikiutils/shared/time';\n *\n * const controller = new AbortController();\n * setTimeout(() => controller.abort(), 1000);\n * await delay(5000, controller.signal); // resolves after ~1s\n * ```\n */\nexport function delay(ms: number, signal?: AbortSignal): Promise<void> {\n return new Promise((resolve) => {\n if (signal?.aborted) {\n resolve();\n return;\n }\n\n const done = () => {\n // eslint-disable-next-line ts/no-use-before-define\n clearTimeout(timeout);\n signal?.removeEventListener('abort', done);\n resolve();\n };\n\n const timeout = setTimeout(done, ms);\n signal?.addEventListener('abort', done, { once: true });\n });\n}\n\n/**\n * Delays execution until the specified duration elapses or the signal is aborted.\n *\n * Aborting the signal rejects the promise with the signal's abort reason.\n *\n * @param {number} ms - Delay duration in milliseconds\n * @param {AbortSignal} [signal] - Optional signal used to abort the delay\n *\n * @returns {Promise<void>} Resolves when the delay completes or rejects when the signal is aborted\n *\n * @example\n * ```typescript\n * import { delayOrThrow } from '@kikiutils/shared/time';\n *\n * const controller = new AbortController();\n * setTimeout(() => controller.abort(), 1000);\n * await delayOrThrow(5000, controller.signal); // rejects after ~1s\n * ```\n */\nexport function delayOrThrow(ms: number, signal?: AbortSignal): Promise<void> {\n return new Promise((resolve, reject) => {\n if (signal?.aborted) {\n reject(signal.reason);\n return;\n }\n\n const onAbort = () => {\n // eslint-disable-next-line ts/no-use-before-define\n clearTimeout(timeout);\n reject(signal!.reason);\n };\n\n const timeout = setTimeout(\n () => {\n signal?.removeEventListener('abort', onAbort);\n resolve();\n },\n ms,\n );\n\n signal?.addEventListener('abort', onAbort, { once: true });\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmBA,SAAgB,MAAM,IAAY,QAAqC;CACnE,OAAO,IAAI,SAAS,YAAY;EAC5B,IAAI,QAAQ,SAAS;GACjB,QAAQ;GACR;EACJ;EAEA,MAAM,aAAa;GAEf,aAAa,OAAO;GACpB,QAAQ,oBAAoB,SAAS,IAAI;GACzC,QAAQ;EACZ;EAEA,MAAM,UAAU,WAAW,MAAM,EAAE;EACnC,QAAQ,iBAAiB,SAAS,MAAM,EAAE,MAAM,KAAK,CAAC;CAC1D,CAAC;AACL;;;;;;;;;;;;;;;;;;;;AAqBA,SAAgB,aAAa,IAAY,QAAqC;CAC1E,OAAO,IAAI,SAAS,SAAS,WAAW;EACpC,IAAI,QAAQ,SAAS;GACjB,OAAO,OAAO,MAAM;GACpB;EACJ;EAEA,MAAM,gBAAgB;GAElB,aAAa,OAAO;GACpB,OAAO,OAAQ,MAAM;EACzB;EAEA,MAAM,UAAU,iBACN;GACF,QAAQ,oBAAoB,SAAS,OAAO;GAC5C,QAAQ;EACZ,GACA,EACJ;EAEA,QAAQ,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK,CAAC;CAC7D,CAAC;AACL"}
@@ -1,5 +1,4 @@
1
1
  import { ObjectId } from "bson";
2
-
3
2
  //#region src/types/filtered-key-path.d.ts
4
3
  /**
5
4
  * The following types are based on or inspired by types from the Element Plus project.
@@ -19,7 +18,7 @@ type DefaultPath<K extends number | string, V, U = never, RK = `${K}`> = V exten
19
18
  * @template T - The object type to traverse.
20
19
  * @template U - The type used to filter key paths. Defaults to `never`, meaning no filtering.
21
20
  */
22
- type FilteredKeyPath<T, U = never> = T extends ReadonlyArray<infer V> ? (IsTuple<T> extends true ? { [K in TupleKey<T>]-?: PathImpl<Exclude<K, symbol>, T[K], U> }[TupleKey<T>] : PathImpl<number, V, U>) : { [K in keyof T]-?: PathImpl<Exclude<K, symbol>, T[K], U> }[keyof T];
21
+ type FilteredKeyPath<T, U = never> = T extends ReadonlyArray<infer V> ? (IsTuple<T> extends true ? { [K in TupleKey<T>]-?: PathImpl<Exclude<K, symbol>, T[K], U>; }[TupleKey<T>] : PathImpl<number, V, U>) : { [K in keyof T]-?: PathImpl<Exclude<K, symbol>, T[K], U>; }[keyof T];
23
22
  type IsTuple<T extends ReadonlyArray<any>> = number extends T['length'] ? false : true;
24
23
  type PathImpl<K extends number | string, V, U> = [U] extends [never] ? DefaultPath<K, V> : ConditionalPath<K, V, U>;
25
24
  type TerminalType = bigint | Blob | boolean | Date | File | null | number | ObjectId | RegExp | string | symbol | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"filtered-key-path.d.ts","names":[],"sources":["../../src/types/filtered-key-path.ts"],"mappings":";;;;;AAAqC;;;;;;KAWhC,eAAA,oCAAmD,CAAA,SAAU,CAAA,MAAO,CAAA,KAAM,WAAA,CAAY,CAAA,EAAG,CAAA,EAAG,CAAA;AAAA,KAC5F,WAAA,kDAIO,CAAA,MACR,CAAA,SAAU,YAAA,GAAe,EAAA,MAAQ,CAAA,IAAK,eAAA,CAAgB,CAAA,EAAG,CAAA;;;;;;;;;KAWjD,eAAA,iBAAgC,CAAA,SAAU,aAAA,aAA0B,OAAA,CAAQ,CAAA,yBAA0B,QAAA,CAAS,CAAA,MAAO,QAAA,CAAS,OAAA,CAAQ,CAAA,WAAY,CAAA,CAAE,CAAA,GAAI,CAAA,IAAK,QAAA,CAAS,CAAA,KAAM,QAAA,SAAiB,CAAA,EAAG,CAAA,mBAAoB,CAAA,KAAM,QAAA,CAAS,OAAA,CAAQ,CAAA,WAAY,CAAA,CAAE,CAAA,GAAI,CAAA,UAAW,CAAA;AAAA,KAChR,OAAA,WAAkB,aAAA,wBAAqC,CAAC;AAAA,KACxD,QAAA,qCAA6C,CAAA,oBAAqB,WAAA,CAAY,CAAA,EAAG,CAAA,IAAK,eAAA,CAAgB,CAAA,EAAG,CAAA,EAAG,CAAA;AAAA,KAC5G,YAAA,YAED,IAAA,aAEA,IAAA,GACA,IAAA,mBAGA,QAAA,GACA,MAAA;AAAA,KAKC,QAAA,WAAmB,aAAA,SAAsB,OAAA,OAAc,CAAA"}
1
+ {"version":3,"file":"filtered-key-path.d.ts","names":[],"sources":["../../src/types/filtered-key-path.ts"],"mappings":";;;;;;;;;;KAWK,gBAAgB,2BAA2B,GAAG,KAAK,UAAU,OAAO,MAAM,YAAY,GAAG,GAAG;KAC5F,YACD,2BACA,GACA,WACA,QAAQ,OACR,UAAU,eAAe,QAAQ,KAAK,gBAAgB,GAAG;;;;;;;;;KAWjD,gBAAgB,GAAG,aAAa,UAAU,oBAAoB,MAAM,QAAQ,qBAAqB,KAAK,SAAS,OAAO,SAAS,QAAQ,YAAY,EAAE,IAAI,MAAK,SAAS,MAAM,iBAAiB,GAAG,SAAS,WAAW,MAAM,SAAS,QAAQ,YAAY,EAAE,IAAI,YAAW;KAChR,QAAQ,UAAU,qCAAqC;KACvD,SAAS,2BAA2B,GAAG,MAAM,qBAAqB,YAAY,GAAG,KAAK,gBAAgB,GAAG,GAAG;KAC5G,wBAED,iBAEA,OACA,uBAGA,WACA;KAKC,SAAS,UAAU,sBAAsB,cAAc"}