@rtorcato/js-common 1.3.0 → 1.4.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 (111) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +22 -0
  3. package/package.json +2 -2
  4. package/dist/abortController/index.d.ts +0 -29
  5. package/dist/abortController/index.d.ts.map +0 -1
  6. package/dist/arrays/index.d.ts +0 -44
  7. package/dist/arrays/index.d.ts.map +0 -1
  8. package/dist/boolean/index.d.ts +0 -41
  9. package/dist/boolean/index.d.ts.map +0 -1
  10. package/dist/colors/index.d.ts +0 -63
  11. package/dist/colors/index.d.ts.map +0 -1
  12. package/dist/console/index.d.ts +0 -16
  13. package/dist/console/index.d.ts.map +0 -1
  14. package/dist/crypto/index.d.ts +0 -34
  15. package/dist/crypto/index.d.ts.map +0 -1
  16. package/dist/currency/currencies.d.ts +0 -16
  17. package/dist/currency/currencies.d.ts.map +0 -1
  18. package/dist/currency/index.d.ts +0 -52
  19. package/dist/currency/index.d.ts.map +0 -1
  20. package/dist/date/index.d.ts +0 -44
  21. package/dist/date/index.d.ts.map +0 -1
  22. package/dist/datetime/index.d.ts +0 -52
  23. package/dist/datetime/index.d.ts.map +0 -1
  24. package/dist/emails/banned/index.d.ts +0 -9
  25. package/dist/emails/banned/index.d.ts.map +0 -1
  26. package/dist/emails/index.d.ts +0 -26
  27. package/dist/emails/index.d.ts.map +0 -1
  28. package/dist/env/index.d.ts +0 -63
  29. package/dist/env/index.d.ts.map +0 -1
  30. package/dist/errors/index.d.ts +0 -39
  31. package/dist/errors/index.d.ts.map +0 -1
  32. package/dist/events/index.d.ts +0 -35
  33. package/dist/events/index.d.ts.map +0 -1
  34. package/dist/fetch/index.d.ts +0 -38
  35. package/dist/fetch/index.d.ts.map +0 -1
  36. package/dist/file/index.d.ts +0 -32
  37. package/dist/file/index.d.ts.map +0 -1
  38. package/dist/formatting/index.d.ts +0 -52
  39. package/dist/formatting/index.d.ts.map +0 -1
  40. package/dist/functions/index.d.ts +0 -33
  41. package/dist/functions/index.d.ts.map +0 -1
  42. package/dist/geometry/index.d.ts +0 -58
  43. package/dist/geometry/index.d.ts.map +0 -1
  44. package/dist/html/index.d.ts +0 -31
  45. package/dist/html/index.d.ts.map +0 -1
  46. package/dist/i18n/index.d.ts +0 -37
  47. package/dist/i18n/index.d.ts.map +0 -1
  48. package/dist/index.d.ts +0 -3
  49. package/dist/index.d.ts.map +0 -1
  50. package/dist/interval/index.d.ts +0 -13
  51. package/dist/interval/index.d.ts.map +0 -1
  52. package/dist/json/index.d.ts +0 -28
  53. package/dist/json/index.d.ts.map +0 -1
  54. package/dist/logger/logger.d.ts +0 -3
  55. package/dist/logger/logger.d.ts.map +0 -1
  56. package/dist/logging/index.d.ts +0 -28
  57. package/dist/logging/index.d.ts.map +0 -1
  58. package/dist/logging/index1.d.ts +0 -33
  59. package/dist/logging/index1.d.ts.map +0 -1
  60. package/dist/maps/index.d.ts +0 -32
  61. package/dist/maps/index.d.ts.map +0 -1
  62. package/dist/math/index.d.ts +0 -3
  63. package/dist/math/index.d.ts.map +0 -1
  64. package/dist/math/math.d.ts +0 -37
  65. package/dist/math/math.d.ts.map +0 -1
  66. package/dist/math/sum/index.d.ts +0 -3
  67. package/dist/math/sum/index.d.ts.map +0 -1
  68. package/dist/mime-types/db.d.ts +0 -4605
  69. package/dist/mime-types/db.d.ts.map +0 -1
  70. package/dist/mime-types/index.d.ts +0 -25
  71. package/dist/mime-types/index.d.ts.map +0 -1
  72. package/dist/node/index.d.ts +0 -52
  73. package/dist/node/index.d.ts.map +0 -1
  74. package/dist/numbers/index.d.ts +0 -74
  75. package/dist/numbers/index.d.ts.map +0 -1
  76. package/dist/obects/index.d.ts +0 -34
  77. package/dist/obects/index.d.ts.map +0 -1
  78. package/dist/os/index.d.ts +0 -26
  79. package/dist/os/index.d.ts.map +0 -1
  80. package/dist/process/index.d.ts +0 -31
  81. package/dist/process/index.d.ts.map +0 -1
  82. package/dist/promises/index.d.ts +0 -39
  83. package/dist/promises/index.d.ts.map +0 -1
  84. package/dist/random/index.d.ts +0 -33
  85. package/dist/random/index.d.ts.map +0 -1
  86. package/dist/regex/index.d.ts +0 -36
  87. package/dist/regex/index.d.ts.map +0 -1
  88. package/dist/security/index.d.ts +0 -14
  89. package/dist/security/index.d.ts.map +0 -1
  90. package/dist/sets/index.d.ts +0 -48
  91. package/dist/sets/index.d.ts.map +0 -1
  92. package/dist/sleep/index.d.ts +0 -27
  93. package/dist/sleep/index.d.ts.map +0 -1
  94. package/dist/strings/index.d.ts +0 -74
  95. package/dist/strings/index.d.ts.map +0 -1
  96. package/dist/system/index.d.ts +0 -36
  97. package/dist/system/index.d.ts.map +0 -1
  98. package/dist/time/index.d.ts +0 -36
  99. package/dist/time/index.d.ts.map +0 -1
  100. package/dist/try/attempt.d.ts +0 -8
  101. package/dist/try/attempt.d.ts.map +0 -1
  102. package/dist/try/index.d.ts +0 -2
  103. package/dist/try/index.d.ts.map +0 -1
  104. package/dist/try/trycatch.d.ts +0 -12
  105. package/dist/try/trycatch.d.ts.map +0 -1
  106. package/dist/url/index.d.ts +0 -40
  107. package/dist/url/index.d.ts.map +0 -1
  108. package/dist/uuid/index.d.ts +0 -40
  109. package/dist/uuid/index.d.ts.map +0 -1
  110. package/dist/validation/index.d.ts +0 -49
  111. package/dist/validation/index.d.ts.map +0 -1
@@ -1,74 +0,0 @@
1
- /**
2
- * Converts a string to Title Case (capitalizes the first letter of each word).
3
- * @param str The string to convert.
4
- * @returns The title-cased string.
5
- */
6
- export declare function titleCase(str: string): string;
7
- /**
8
- * Capitalizes the first letter of a string.
9
- * @param str The string to capitalize.
10
- * @returns The capitalized string.
11
- */
12
- export declare function capitalize(str: string): string;
13
- /**
14
- * Converts a string to camelCase.
15
- * @param str The string to convert.
16
- * @returns The camelCased string.
17
- */
18
- export declare function camelCase(str: string): string;
19
- /**
20
- * Converts a string to kebab-case.
21
- * @param str The string to convert.
22
- * @returns The kebab-cased string.
23
- */
24
- export declare function kebabCase(str: string): string;
25
- /**
26
- * Converts a string to snake_case.
27
- * @param str The string to convert.
28
- * @returns The snake_cased string.
29
- */
30
- export declare function snakeCase(str: string): string;
31
- /**
32
- * Truncates a string to a maximum length, adding ellipsis if needed.
33
- * @param str The string to truncate.
34
- * @param maxLength The maximum length.
35
- * @returns The truncated string.
36
- */
37
- export declare function truncate(str: string, maxLength: number): string;
38
- /**
39
- * Pads the start of a string to a given length.
40
- * @param str The string to pad.
41
- * @param targetLength The target length.
42
- * @param padString The string to pad with.
43
- * @returns The padded string.
44
- */
45
- export declare function padStart(str: string, targetLength: number, padString?: string): string;
46
- /**
47
- * Pads the end of a string to a given length.
48
- * @param str The string to pad.
49
- * @param targetLength The target length.
50
- * @param padString The string to pad with.
51
- * @returns The padded string.
52
- */
53
- export declare function padEnd(str: string, targetLength: number, padString?: string): string;
54
- /**
55
- * get a random string
56
- * var rStr= randomString(32,'0123456789abcdefghijklmn');
57
- * @param {number} length
58
- * @param {string} chars
59
- */
60
- export declare const randomString: (length: number, chars: string) => string;
61
- /**
62
- * replace all items in a string using regex
63
- * @param {string} str
64
- * @param {string} search
65
- * @param {string} replacement
66
- */
67
- export declare const replaceString: (str: string, search: string, replacement: string) => string;
68
- /**
69
- * Sanitizes a string by removing script tags and event handlers.
70
- * @param str The string to sanitize.
71
- * @returns The sanitized string.
72
- */
73
- export declare function sanitizeString(str: string): string;
74
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/strings/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AACD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI7C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAK7C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAK7C;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,SAAM,GAAG,MAAM,CAEnF;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,SAAM,GAAG,MAAM,CAEjF;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,EAAE,OAAO,MAAM,KAAG,MAM5D,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,QAAQ,MAAM,EAAE,aAAa,MAAM,KAAG,MAEhF,CAAA;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD"}
@@ -1,36 +0,0 @@
1
- /**
2
- * Checks if the current OS is macOS.
3
- * @returns {boolean} True if macOS, false otherwise.
4
- */
5
- export declare function isMacOs(): boolean;
6
- /**
7
- * Checks if the current OS is Windows.
8
- * @returns {boolean} True if Windows, false otherwise.
9
- */
10
- export declare function isWindows(): boolean;
11
- /**
12
- * Checks if the current OS is Linux.
13
- * @returns {boolean} True if Linux, false otherwise.
14
- */
15
- export declare function isLinux(): boolean;
16
- /**
17
- * Checks if the device is running iOS.
18
- * @returns {boolean} True if iOS, false otherwise.
19
- */
20
- export declare function isIOS(): boolean;
21
- /**
22
- * Checks if the device is running Android.
23
- * @returns {boolean} True if Android, false otherwise.
24
- */
25
- export declare function isAndroid(): boolean;
26
- /**
27
- * Returns a string representing the detected platform.
28
- * @returns {string} The platform name (e.g., 'macos', 'windows', 'linux', 'ios', 'android', or 'unknown').
29
- */
30
- export declare function getPlatform(): string;
31
- /**
32
- * Checks if the device supports touch events.
33
- * @returns {boolean} True if touch is supported, false otherwise.
34
- */
35
- export declare function isTouchDevice(): boolean;
36
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,OAAO,IAAI,OAAO,CAQjC;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAQnC;AAED;;;GAGG;AACH,wBAAgB,OAAO,IAAI,OAAO,CAQjC;AAED;;;GAGG;AACH,wBAAgB,KAAK,IAAI,OAAO,CAK/B;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAKnC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAOpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAMvC"}
@@ -1,36 +0,0 @@
1
- /**
2
- * Returns the current time as HH:MM:SS string.
3
- * @returns {string}
4
- */
5
- export declare function nowTime(): string;
6
- /**
7
- * Parses a time string (HH:MM or HH:MM:SS) into a Date object (today's date).
8
- * @param timeStr The time string.
9
- * @returns {Date}
10
- */
11
- export declare function parseTime(timeStr: string): Date;
12
- /**
13
- * Formats a Date object as HH:MM:SS.
14
- * @param date The Date object.
15
- * @returns {string}
16
- */
17
- export declare function formatTime(date: Date): string;
18
- /**
19
- * Returns the difference in seconds between two times (as Date or string).
20
- * @param t1 First time (Date or string).
21
- * @param t2 Second time (Date or string).
22
- * @returns {number}
23
- */
24
- export declare function secondsBetween(t1: string | Date, t2: string | Date): number;
25
- /**
26
- * Pads a number to two digits (e.g., 5 -> '05').
27
- * @param n The number.
28
- * @returns {string}
29
- */
30
- export declare function pad2(n: number): string;
31
- /**
32
- * Returns the current time as HH:MM string.
33
- * @returns {string}
34
- */
35
- export declare function nowTimeShort(): string;
36
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/time/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAGhC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAK/C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE7C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAI3E;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEtC;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAGrC"}
@@ -1,8 +0,0 @@
1
- type AttemptSuccess<T> = readonly [null, T];
2
- type AttemptFailure<E> = readonly [E, null];
3
- type AttemptResult<E, T> = AttemptSuccess<T> | AttemptFailure<E>;
4
- type AttemptResultAsync<E, T> = Promise<AttemptResult<E, T>>;
5
- export declare function attempt<E = Error, T = Promise<any>>(operation: T): AttemptResultAsync<E, T>;
6
- export declare function attempt<E = Error, T = any>(operation: () => T): AttemptResult<E, T>;
7
- export {};
8
- //# sourceMappingURL=attempt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attempt.d.ts","sourceRoot":"","sources":["../../src/try/attempt.ts"],"names":[],"mappings":"AAAA,KAAK,cAAc,CAAC,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;AAC3C,KAAK,cAAc,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AAC3C,KAAK,aAAa,CAAC,CAAC,EAAE,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;AAChE,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAE5D,wBAAgB,OAAO,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAC5F,wBAAgB,OAAO,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './trycatch.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/try/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
@@ -1,12 +0,0 @@
1
- export type Success<T> = {
2
- data: T;
3
- error: null;
4
- };
5
- export type Failure<E> = {
6
- data: null;
7
- error: E;
8
- };
9
- export type Result<T, E = Error> = Success<T> | Failure<E>;
10
- export declare function isSuccess<T, E>(result: Result<T, E>): result is Success<T>;
11
- export declare function tryCatch<T, E = Error>(fn: () => Promise<T>): Promise<Result<T, E>>;
12
- //# sourceMappingURL=trycatch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trycatch.d.ts","sourceRoot":"","sources":["../../src/try/trycatch.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,IAAI,CAAA;CAAE,CAAA;AAEjD,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAA;AAEjD,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;AAE1D,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,CAE1E;AAED,wBAAsB,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAOxF"}
@@ -1,40 +0,0 @@
1
- /**
2
- * Checks if a string is a valid URL.
3
- * @param str The string to check.
4
- * @returns True if valid URL, false otherwise.
5
- */
6
- export declare function isValidUrl(str: string): boolean;
7
- /**
8
- * Gets the query parameters from a URL as an object.
9
- * @param url The URL string.
10
- * @returns An object of query parameters.
11
- */
12
- export declare function getQueryParams(url: string): Record<string, string>;
13
- /**
14
- * Adds or updates a query parameter in a URL.
15
- * @param url The URL string.
16
- * @param key The query parameter key.
17
- * @param value The query parameter value.
18
- * @returns The updated URL string.
19
- */
20
- export declare function setQueryParam(url: string, key: string, value: string): string;
21
- /**
22
- * Removes a query parameter from a URL.
23
- * @param url The URL string.
24
- * @param key The query parameter key to remove.
25
- * @returns The updated URL string.
26
- */
27
- export declare function removeQueryParam(url: string, key: string): string;
28
- /**
29
- * Joins multiple URL segments into a single URL, ensuring proper slashes.
30
- * @param parts The URL segments.
31
- * @returns The joined URL string.
32
- */
33
- export declare function joinUrl(...parts: string[]): string;
34
- /**
35
- * Gets the hostname from a URL string.
36
- * @param url The URL string.
37
- * @returns The hostname, or an empty string if invalid.
38
- */
39
- export declare function getHostname(url: string): string;
40
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/url/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAO/C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWlE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAQ7E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAQjE;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAQlD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM/C"}
@@ -1,40 +0,0 @@
1
- /**
2
- * Generates a UUID v4 string.
3
- * @returns {string} A new UUID v4 string.
4
- */
5
- export declare const getUUID: () => string;
6
- /**
7
- * Generates a short UUID string using short-uuid.
8
- * @returns {string} A new short UUID string.
9
- */
10
- export declare const getShortUUID: () => string;
11
- /**
12
- * Checks if a string is a valid UUID (any version).
13
- * @param id The string to validate.
14
- * @returns {boolean} True if valid UUID, false otherwise.
15
- */
16
- export declare const isUUID: (id: string) => boolean;
17
- /**
18
- * Checks if a string is a valid UUID v4.
19
- * @param id The string to validate.
20
- * @returns {boolean} True if valid UUID v4, false otherwise.
21
- */
22
- export declare const isUUIDv4: (id: string) => boolean;
23
- /**
24
- * Returns the nil UUID (all zeros).
25
- * @returns {string} The nil UUID string.
26
- */
27
- export declare const getNilUUID: () => string;
28
- /**
29
- * Converts a UUID string to a byte array (Uint8Array).
30
- * @param id The UUID string.
31
- * @returns {Uint8Array} The byte array representation of the UUID.
32
- */
33
- export declare const uuidToBytes: (id: string) => Uint8Array;
34
- /**
35
- * Converts a byte array (Uint8Array) to a UUID string.
36
- * @param bytes The byte array.
37
- * @returns {string} The UUID string.
38
- */
39
- export declare const bytesToUUID: (bytes: Uint8Array) => string;
40
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/uuid/index.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,eAAO,MAAM,OAAO,QAAO,MAE1B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAO,MAE/B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,IAAI,MAAM,KAAG,OAA2B,CAAA;AAE/D;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,IAAI,MAAM,KAAG,OAAoD,CAAA;AAE1F;;;GAGG;AACH,eAAO,MAAM,UAAU,QAAO,MAAkB,CAAA;AAEhD;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,IAAI,MAAM,KAAG,UAA2B,CAAA;AAEpE;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,UAAU,KAAG,MAA8B,CAAA"}
@@ -1,49 +0,0 @@
1
- /**
2
- * Checks if a value is defined (not null or undefined).
3
- * @param value The value to check.
4
- * @returns {boolean}
5
- */
6
- export declare function isDefined<T>(value: T | null | undefined): value is T;
7
- /**
8
- * Check if a value is a string.
9
- * @param value - The value to check.
10
- * @returns `true` if the value is a string, `false` otherwise.
11
- */
12
- export declare function isString(value: any): value is string;
13
- /**
14
- * Checks if a value is a number (and not NaN).
15
- * @param value The value to check.
16
- * @returns {boolean}
17
- */
18
- export declare function isNumber(value: any): value is number;
19
- /**
20
- * Checks if a value is a boolean.
21
- * @param value The value to check.
22
- * @returns {boolean}
23
- */
24
- export declare function isBoolean(value: any): value is boolean;
25
- /**
26
- * Checks if a value is an array.
27
- * @param value The value to check.
28
- * @returns {boolean}
29
- */
30
- export declare function isArray(value: any): value is any[];
31
- /**
32
- * Checks if a value is an object (but not null or array).
33
- * @param value The value to check.
34
- * @returns {boolean}
35
- */
36
- export declare function isObject(value: any): value is object;
37
- /**
38
- * Checks if a string is a valid email address (simple regex).
39
- * @param str The string to check.
40
- * @returns {boolean}
41
- */
42
- export declare function isEmail(str: string): boolean;
43
- /**
44
- * Checks if a string is a valid URL.
45
- * @param str The string to check.
46
- * @returns {boolean}
47
- */
48
- export declare function isUrl(str: string): boolean;
49
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,CAAC,CAEpE;AAED;;;;GAIG;AAEH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,MAAM,CAEpD;AAED;;;;GAIG;AAEH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,MAAM,CAEpD;AAED;;;;GAIG;AAEH,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,OAAO,CAEtD;AAED;;;;GAIG;AAEH,wBAAgB,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,GAAG,EAAE,CAElD;AAED;;;;GAIG;AAEH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,MAAM,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE5C;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAO1C"}