@md-oss/common 0.1.6 → 0.1.7

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 (129) hide show
  1. package/dist/arrays-6DA6GfsQ.mjs +2 -0
  2. package/dist/arrays-6DA6GfsQ.mjs.map +1 -0
  3. package/dist/arrays-DvPJ1GeR.d.cts +163 -0
  4. package/dist/arrays-DvPJ1GeR.d.mts +163 -0
  5. package/dist/arrays-bgbansWs.cjs +2 -0
  6. package/dist/arrays-bgbansWs.cjs.map +1 -0
  7. package/dist/constants/bytes.cjs +1 -1
  8. package/dist/constants/bytes.cjs.map +1 -1
  9. package/dist/constants/bytes.d.cts +31 -1
  10. package/dist/constants/bytes.d.mts +31 -1
  11. package/dist/constants/bytes.mjs +1 -1
  12. package/dist/constants/bytes.mjs.map +1 -1
  13. package/dist/files-DzKYei0a.mjs +2 -0
  14. package/dist/files-DzKYei0a.mjs.map +1 -0
  15. package/dist/files-m1nnj5gT.cjs +2 -0
  16. package/dist/files-m1nnj5gT.cjs.map +1 -0
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.d.cts +10 -8
  19. package/dist/index.d.mts +10 -8
  20. package/dist/index.mjs +1 -1
  21. package/dist/mime-types-BmvBrrZ7.cjs.map +1 -1
  22. package/dist/mime-types-D_K53zgk.mjs.map +1 -1
  23. package/dist/{mime-types-Bjt4NvnE.d.cts → mime-types-Dajfhq2c.d.cts} +58 -1
  24. package/dist/{mime-types-Bjt4NvnE.d.mts → mime-types-Dajfhq2c.d.mts} +58 -1
  25. package/dist/numbers-B_mptknO.cjs +2 -0
  26. package/dist/numbers-B_mptknO.cjs.map +1 -0
  27. package/dist/numbers-C2680fmA.d.cts +184 -0
  28. package/dist/numbers-C2680fmA.d.mts +184 -0
  29. package/dist/numbers-lJ6gwIpk.mjs +2 -0
  30. package/dist/numbers-lJ6gwIpk.mjs.map +1 -0
  31. package/dist/objects-VXf3mqE5.mjs +2 -0
  32. package/dist/objects-VXf3mqE5.mjs.map +1 -0
  33. package/dist/objects-fiFExjsf.d.cts +116 -0
  34. package/dist/objects-fiFExjsf.d.mts +116 -0
  35. package/dist/objects-wcO6hNA8.cjs +2 -0
  36. package/dist/objects-wcO6hNA8.cjs.map +1 -0
  37. package/dist/random-668tofPV.cjs +2 -0
  38. package/dist/random-668tofPV.cjs.map +1 -0
  39. package/dist/random-BqJDZAPb.d.cts +131 -0
  40. package/dist/random-BqJDZAPb.d.mts +131 -0
  41. package/dist/random-ihslkInn.mjs +2 -0
  42. package/dist/random-ihslkInn.mjs.map +1 -0
  43. package/dist/runtime-7fkN5_oL.d.cts +206 -0
  44. package/dist/runtime-7fkN5_oL.d.mts +206 -0
  45. package/dist/runtime-Bfs-yn_-.cjs +2 -0
  46. package/dist/runtime-Bfs-yn_-.cjs.map +1 -0
  47. package/dist/runtime-CE36Va0l.mjs +2 -0
  48. package/dist/runtime-CE36Va0l.mjs.map +1 -0
  49. package/dist/strings-CrzGdnZH.mjs +3 -0
  50. package/dist/strings-CrzGdnZH.mjs.map +1 -0
  51. package/dist/strings-_1vAPvzS.cjs +3 -0
  52. package/dist/strings-_1vAPvzS.cjs.map +1 -0
  53. package/dist/strings-jE1j-qqa.d.cts +213 -0
  54. package/dist/strings-jE1j-qqa.d.mts +213 -0
  55. package/dist/time-BrLHgSth.d.mts +68 -0
  56. package/dist/time-DmJNWZeL.mjs.map +1 -1
  57. package/dist/time-ufhllID1.d.cts +68 -0
  58. package/dist/time-yNkQSJnQ.cjs.map +1 -1
  59. package/dist/utils/arrays.cjs +1 -1
  60. package/dist/utils/arrays.d.cts +1 -1
  61. package/dist/utils/arrays.d.mts +1 -1
  62. package/dist/utils/arrays.mjs +1 -1
  63. package/dist/utils/index.cjs +1 -1
  64. package/dist/utils/index.d.cts +187 -8
  65. package/dist/utils/index.d.mts +187 -8
  66. package/dist/utils/index.mjs +1 -1
  67. package/dist/utils/mime-types.d.cts +1 -1
  68. package/dist/utils/mime-types.d.mts +1 -1
  69. package/dist/utils/numbers.cjs +1 -1
  70. package/dist/utils/numbers.d.cts +1 -1
  71. package/dist/utils/numbers.d.mts +1 -1
  72. package/dist/utils/numbers.mjs +1 -1
  73. package/dist/utils/objects.cjs +1 -1
  74. package/dist/utils/objects.d.cts +1 -1
  75. package/dist/utils/objects.d.mts +1 -1
  76. package/dist/utils/objects.mjs +1 -1
  77. package/dist/utils/random.cjs +1 -1
  78. package/dist/utils/random.d.cts +1 -1
  79. package/dist/utils/random.d.mts +1 -1
  80. package/dist/utils/random.mjs +1 -1
  81. package/dist/utils/runtime.cjs +1 -1
  82. package/dist/utils/runtime.d.cts +1 -1
  83. package/dist/utils/runtime.d.mts +1 -1
  84. package/dist/utils/runtime.mjs +1 -1
  85. package/dist/utils/strings.cjs +1 -1
  86. package/dist/utils/strings.d.cts +1 -1
  87. package/dist/utils/strings.d.mts +1 -1
  88. package/dist/utils/strings.mjs +1 -1
  89. package/dist/utils/time.d.cts +1 -1
  90. package/dist/utils/time.d.mts +1 -1
  91. package/package.json +2 -2
  92. package/dist/arrays-BkHBzTDO.mjs +0 -2
  93. package/dist/arrays-BkHBzTDO.mjs.map +0 -1
  94. package/dist/arrays-CElcW69H.d.cts +0 -43
  95. package/dist/arrays-CElcW69H.d.mts +0 -43
  96. package/dist/arrays-DaB1Xn47.cjs +0 -2
  97. package/dist/arrays-DaB1Xn47.cjs.map +0 -1
  98. package/dist/numbers-CtAqd3eH.d.cts +0 -49
  99. package/dist/numbers-CtAqd3eH.d.mts +0 -49
  100. package/dist/numbers-D2K-8sJL.mjs +0 -2
  101. package/dist/numbers-D2K-8sJL.mjs.map +0 -1
  102. package/dist/numbers-Du__2-8Y.cjs +0 -2
  103. package/dist/numbers-Du__2-8Y.cjs.map +0 -1
  104. package/dist/objects--cO_X3EV.mjs +0 -2
  105. package/dist/objects--cO_X3EV.mjs.map +0 -1
  106. package/dist/objects-CnGoVkh6.cjs +0 -2
  107. package/dist/objects-CnGoVkh6.cjs.map +0 -1
  108. package/dist/objects-cf8j7rS8.d.cts +0 -26
  109. package/dist/objects-cf8j7rS8.d.mts +0 -26
  110. package/dist/random-D1e1NTOt.cjs +0 -2
  111. package/dist/random-D1e1NTOt.cjs.map +0 -1
  112. package/dist/random-DbidGSrQ.mjs +0 -2
  113. package/dist/random-DbidGSrQ.mjs.map +0 -1
  114. package/dist/random-DpNyGGAZ.d.cts +0 -28
  115. package/dist/random-DpNyGGAZ.d.mts +0 -28
  116. package/dist/runtime-DY-8W6Jr.mjs +0 -2
  117. package/dist/runtime-DY-8W6Jr.mjs.map +0 -1
  118. package/dist/runtime-T8Kcf7Af.d.cts +0 -28
  119. package/dist/runtime-T8Kcf7Af.d.mts +0 -28
  120. package/dist/runtime-peVFcWot.cjs +0 -2
  121. package/dist/runtime-peVFcWot.cjs.map +0 -1
  122. package/dist/strings-B0BRwNX9.mjs +0 -3
  123. package/dist/strings-B0BRwNX9.mjs.map +0 -1
  124. package/dist/strings-DV446vv-.cjs +0 -3
  125. package/dist/strings-DV446vv-.cjs.map +0 -1
  126. package/dist/strings-DhPbrpq7.d.cts +0 -47
  127. package/dist/strings-DhPbrpq7.d.mts +0 -47
  128. package/dist/time-8KLG8kBO.d.cts +0 -29
  129. package/dist/time-D8Wfqzu6.d.mts +0 -29
@@ -1,9 +1,188 @@
1
- export { a as ArrayUtils } from '../arrays-CElcW69H.cjs';
2
- export { m as MimeTypeUtils } from '../mime-types-Bjt4NvnE.cjs';
3
- export { n as NumberUtils } from '../numbers-CtAqd3eH.cjs';
4
- export { o as ObjectUtils } from '../objects-cf8j7rS8.cjs';
5
- export { r as RandomUtils } from '../random-DpNyGGAZ.cjs';
6
- export { r as RuntimeUtils } from '../runtime-T8Kcf7Af.cjs';
7
- export { s as StringUtils } from '../strings-DhPbrpq7.cjs';
8
- export { t as TimeUtils } from '../time-8KLG8kBO.cjs';
1
+ export { a as ArrayUtils } from '../arrays-DvPJ1GeR.cjs';
2
+ import { statSync } from 'node:fs';
3
+ export { m as MimeTypeUtils } from '../mime-types-Dajfhq2c.cjs';
4
+ export { n as NumberUtils } from '../numbers-C2680fmA.cjs';
5
+ export { o as ObjectUtils } from '../objects-fiFExjsf.cjs';
6
+ export { r as RandomUtils } from '../random-BqJDZAPb.cjs';
7
+ export { r as RuntimeUtils } from '../runtime-7fkN5_oL.cjs';
8
+ export { s as StringUtils } from '../strings-jE1j-qqa.cjs';
9
+ export { t as TimeUtils } from '../time-ufhllID1.cjs';
9
10
  import '../constants/time.cjs';
11
+
12
+ /**
13
+ * Regular expression pattern for parsing byte strings
14
+ *
15
+ * Matches strings in the format: `<number> <unit>` where:
16
+ * - `<number>` is an integer or decimal number
17
+ * - `<unit>` is an optional unit (b, kb, mb, gb, tb, pb, eb, zb, yb)
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * '1024'.match(BYTE_STRING_PATTERN) // ['1024', '1024', undefined]
22
+ * '1.5 MB'.match(BYTE_STRING_PATTERN) // ['1.5 MB', '1.5', 'MB']
23
+ * '100 KB'.match(BYTE_STRING_PATTERN) // ['100 KB', '100', 'KB']
24
+ * '2.5gb'.match(BYTE_STRING_PATTERN) // ['2.5gb', '2.5', 'gb']
25
+ * '500'.match(BYTE_STRING_PATTERN) // ['500', '500', undefined]
26
+ * ```
27
+ */
28
+ declare const BYTE_STRING_PATTERN: RegExp;
29
+ /**
30
+ * Format bytes to human readable format
31
+ * @param bytes - Number of bytes
32
+ * @param decimals - Number of decimal places (default: 2)
33
+ * @returns Formatted string (e.g., "1.5 MB")
34
+ */
35
+ declare function formatBytes(bytes: number, decimals?: number): string;
36
+ /**
37
+ * Parse bytes from human readable format
38
+ * @param value - String value (e.g., "1.5 MB")
39
+ * @returns Number of bytes
40
+ */
41
+ declare function parseBytes(value: string): number;
42
+ interface GetFilesOptions {
43
+ /**
44
+ * File extensions to include (e.g., ['.ts', '.js'])
45
+ * If not provided, all files are included
46
+ */
47
+ extensions?: string[];
48
+ /**
49
+ * Whether to include dotfiles (default: false)
50
+ */
51
+ includeDotFiles?: boolean;
52
+ /**
53
+ * Whether to search recursively (default: true)
54
+ */
55
+ recursive?: boolean;
56
+ /**
57
+ * Maximum depth for recursive search (default: Infinity)
58
+ */
59
+ maxDepth?: number;
60
+ /**
61
+ * Directories to exclude from search
62
+ */
63
+ excludeDirs?: string[];
64
+ /**
65
+ * Pattern to match file names (regex or string)
66
+ */
67
+ pattern?: string | RegExp;
68
+ /**
69
+ * Whether to return absolute paths (default: false)
70
+ */
71
+ absolutePaths?: boolean;
72
+ /**
73
+ * Custom filter function
74
+ */
75
+ filter?: (filePath: string, stats: ReturnType<typeof statSync>) => boolean;
76
+ }
77
+ /**
78
+ * Get files from a directory with various filtering options
79
+ * @param dirPath - Directory path to search
80
+ * @param options - Options for filtering files
81
+ * @returns Array of file paths
82
+ */
83
+ declare function getFiles(dirPath: string, options?: GetFilesOptions): string[];
84
+ /**
85
+ * Get file extension including the dot (e.g., ".ts")
86
+ * @param filePath - File path
87
+ * @returns File extension
88
+ */
89
+ declare function getExtension(filePath: string): string;
90
+ /**
91
+ * Get file name without parent directories, optionally including the extension
92
+ * @param filePath - File path
93
+ * @param includeExtension - Whether to include the file extension (default: true)
94
+ * @returns File name without directories (e.g., "index.ts" or "index" if includeExtension is false)
95
+ */
96
+ declare function getBaseName(filePath: string, includeExtension?: boolean): string;
97
+ /**
98
+ * Get directory name from file path
99
+ * @param filePath - File path
100
+ * @returns Directory name
101
+ */
102
+ declare function getDirName(filePath: string): string;
103
+ /**
104
+ * Parse file path into components
105
+ * @param filePath - File path
106
+ * @returns Parsed path object
107
+ */
108
+ declare function parseFilePath(filePath: string): {
109
+ root: string;
110
+ dir: string;
111
+ base: string;
112
+ ext: string;
113
+ name: string;
114
+ };
115
+ /**
116
+ * Get file size in bytes
117
+ * @param filePath - File path
118
+ * @returns File size in bytes
119
+ */
120
+ declare function getFileSize(filePath: string): number;
121
+ /**
122
+ * Get human readable file size
123
+ * @param filePath - File path
124
+ * @param decimals - Number of decimal places (default: 2)
125
+ * @returns Formatted file size
126
+ */
127
+ declare function getFileSizeFormatted(filePath: string, decimals?: number): string;
128
+ /**
129
+ * Check if path is a directory
130
+ * @param path - Path to check
131
+ * @returns True if path is a directory
132
+ */
133
+ declare function isDirectory(path: string): boolean;
134
+ /**
135
+ * Check if path is a file
136
+ * @param path - Path to check
137
+ * @returns True if path is a file
138
+ */
139
+ declare function isFile(path: string): boolean;
140
+ /**
141
+ * Check if file is a dotfile
142
+ * @param filePath - File path
143
+ * @returns True if file is a dotfile
144
+ */
145
+ declare function isDotFile(filePath: string): boolean;
146
+ /**
147
+ * Normalize file extension (ensure it starts with a dot)
148
+ * @param ext - File extension
149
+ * @returns Normalized extension
150
+ */
151
+ declare function normalizeExtension(ext: string): string;
152
+ /**
153
+ * Check if file has specific extension
154
+ * @param filePath - File path
155
+ * @param extensions - Extension or array of extensions to check
156
+ * @returns True if file has one of the extensions
157
+ */
158
+ declare function hasExtension(filePath: string, extensions: string | string[]): boolean;
159
+ /**
160
+ * Group files by extension
161
+ * @param filePaths - Array of file paths
162
+ * @returns Object with extensions as keys and file paths as values
163
+ */
164
+ declare function groupByExtension(filePaths: string[]): Record<string, string[]>;
165
+
166
+ declare const files_BYTE_STRING_PATTERN: typeof BYTE_STRING_PATTERN;
167
+ type files_GetFilesOptions = GetFilesOptions;
168
+ declare const files_formatBytes: typeof formatBytes;
169
+ declare const files_getBaseName: typeof getBaseName;
170
+ declare const files_getDirName: typeof getDirName;
171
+ declare const files_getExtension: typeof getExtension;
172
+ declare const files_getFileSize: typeof getFileSize;
173
+ declare const files_getFileSizeFormatted: typeof getFileSizeFormatted;
174
+ declare const files_getFiles: typeof getFiles;
175
+ declare const files_groupByExtension: typeof groupByExtension;
176
+ declare const files_hasExtension: typeof hasExtension;
177
+ declare const files_isDirectory: typeof isDirectory;
178
+ declare const files_isDotFile: typeof isDotFile;
179
+ declare const files_isFile: typeof isFile;
180
+ declare const files_normalizeExtension: typeof normalizeExtension;
181
+ declare const files_parseBytes: typeof parseBytes;
182
+ declare const files_parseFilePath: typeof parseFilePath;
183
+ declare namespace files {
184
+ export { files_BYTE_STRING_PATTERN as BYTE_STRING_PATTERN, files_formatBytes as formatBytes, files_getBaseName as getBaseName, files_getDirName as getDirName, files_getExtension as getExtension, files_getFileSize as getFileSize, files_getFileSizeFormatted as getFileSizeFormatted, files_getFiles as getFiles, files_groupByExtension as groupByExtension, files_hasExtension as hasExtension, files_isDirectory as isDirectory, files_isDotFile as isDotFile, files_isFile as isFile, files_normalizeExtension as normalizeExtension, files_parseBytes as parseBytes, files_parseFilePath as parseFilePath };
185
+ export type { files_GetFilesOptions as GetFilesOptions };
186
+ }
187
+
188
+ export { files as FileUtils };
@@ -1,9 +1,188 @@
1
- export { a as ArrayUtils } from '../arrays-CElcW69H.mjs';
2
- export { m as MimeTypeUtils } from '../mime-types-Bjt4NvnE.mjs';
3
- export { n as NumberUtils } from '../numbers-CtAqd3eH.mjs';
4
- export { o as ObjectUtils } from '../objects-cf8j7rS8.mjs';
5
- export { r as RandomUtils } from '../random-DpNyGGAZ.mjs';
6
- export { r as RuntimeUtils } from '../runtime-T8Kcf7Af.mjs';
7
- export { s as StringUtils } from '../strings-DhPbrpq7.mjs';
8
- export { t as TimeUtils } from '../time-D8Wfqzu6.mjs';
1
+ export { a as ArrayUtils } from '../arrays-DvPJ1GeR.mjs';
2
+ import { statSync } from 'node:fs';
3
+ export { m as MimeTypeUtils } from '../mime-types-Dajfhq2c.mjs';
4
+ export { n as NumberUtils } from '../numbers-C2680fmA.mjs';
5
+ export { o as ObjectUtils } from '../objects-fiFExjsf.mjs';
6
+ export { r as RandomUtils } from '../random-BqJDZAPb.mjs';
7
+ export { r as RuntimeUtils } from '../runtime-7fkN5_oL.mjs';
8
+ export { s as StringUtils } from '../strings-jE1j-qqa.mjs';
9
+ export { t as TimeUtils } from '../time-BrLHgSth.mjs';
9
10
  import '../constants/time.mjs';
11
+
12
+ /**
13
+ * Regular expression pattern for parsing byte strings
14
+ *
15
+ * Matches strings in the format: `<number> <unit>` where:
16
+ * - `<number>` is an integer or decimal number
17
+ * - `<unit>` is an optional unit (b, kb, mb, gb, tb, pb, eb, zb, yb)
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * '1024'.match(BYTE_STRING_PATTERN) // ['1024', '1024', undefined]
22
+ * '1.5 MB'.match(BYTE_STRING_PATTERN) // ['1.5 MB', '1.5', 'MB']
23
+ * '100 KB'.match(BYTE_STRING_PATTERN) // ['100 KB', '100', 'KB']
24
+ * '2.5gb'.match(BYTE_STRING_PATTERN) // ['2.5gb', '2.5', 'gb']
25
+ * '500'.match(BYTE_STRING_PATTERN) // ['500', '500', undefined]
26
+ * ```
27
+ */
28
+ declare const BYTE_STRING_PATTERN: RegExp;
29
+ /**
30
+ * Format bytes to human readable format
31
+ * @param bytes - Number of bytes
32
+ * @param decimals - Number of decimal places (default: 2)
33
+ * @returns Formatted string (e.g., "1.5 MB")
34
+ */
35
+ declare function formatBytes(bytes: number, decimals?: number): string;
36
+ /**
37
+ * Parse bytes from human readable format
38
+ * @param value - String value (e.g., "1.5 MB")
39
+ * @returns Number of bytes
40
+ */
41
+ declare function parseBytes(value: string): number;
42
+ interface GetFilesOptions {
43
+ /**
44
+ * File extensions to include (e.g., ['.ts', '.js'])
45
+ * If not provided, all files are included
46
+ */
47
+ extensions?: string[];
48
+ /**
49
+ * Whether to include dotfiles (default: false)
50
+ */
51
+ includeDotFiles?: boolean;
52
+ /**
53
+ * Whether to search recursively (default: true)
54
+ */
55
+ recursive?: boolean;
56
+ /**
57
+ * Maximum depth for recursive search (default: Infinity)
58
+ */
59
+ maxDepth?: number;
60
+ /**
61
+ * Directories to exclude from search
62
+ */
63
+ excludeDirs?: string[];
64
+ /**
65
+ * Pattern to match file names (regex or string)
66
+ */
67
+ pattern?: string | RegExp;
68
+ /**
69
+ * Whether to return absolute paths (default: false)
70
+ */
71
+ absolutePaths?: boolean;
72
+ /**
73
+ * Custom filter function
74
+ */
75
+ filter?: (filePath: string, stats: ReturnType<typeof statSync>) => boolean;
76
+ }
77
+ /**
78
+ * Get files from a directory with various filtering options
79
+ * @param dirPath - Directory path to search
80
+ * @param options - Options for filtering files
81
+ * @returns Array of file paths
82
+ */
83
+ declare function getFiles(dirPath: string, options?: GetFilesOptions): string[];
84
+ /**
85
+ * Get file extension including the dot (e.g., ".ts")
86
+ * @param filePath - File path
87
+ * @returns File extension
88
+ */
89
+ declare function getExtension(filePath: string): string;
90
+ /**
91
+ * Get file name without parent directories, optionally including the extension
92
+ * @param filePath - File path
93
+ * @param includeExtension - Whether to include the file extension (default: true)
94
+ * @returns File name without directories (e.g., "index.ts" or "index" if includeExtension is false)
95
+ */
96
+ declare function getBaseName(filePath: string, includeExtension?: boolean): string;
97
+ /**
98
+ * Get directory name from file path
99
+ * @param filePath - File path
100
+ * @returns Directory name
101
+ */
102
+ declare function getDirName(filePath: string): string;
103
+ /**
104
+ * Parse file path into components
105
+ * @param filePath - File path
106
+ * @returns Parsed path object
107
+ */
108
+ declare function parseFilePath(filePath: string): {
109
+ root: string;
110
+ dir: string;
111
+ base: string;
112
+ ext: string;
113
+ name: string;
114
+ };
115
+ /**
116
+ * Get file size in bytes
117
+ * @param filePath - File path
118
+ * @returns File size in bytes
119
+ */
120
+ declare function getFileSize(filePath: string): number;
121
+ /**
122
+ * Get human readable file size
123
+ * @param filePath - File path
124
+ * @param decimals - Number of decimal places (default: 2)
125
+ * @returns Formatted file size
126
+ */
127
+ declare function getFileSizeFormatted(filePath: string, decimals?: number): string;
128
+ /**
129
+ * Check if path is a directory
130
+ * @param path - Path to check
131
+ * @returns True if path is a directory
132
+ */
133
+ declare function isDirectory(path: string): boolean;
134
+ /**
135
+ * Check if path is a file
136
+ * @param path - Path to check
137
+ * @returns True if path is a file
138
+ */
139
+ declare function isFile(path: string): boolean;
140
+ /**
141
+ * Check if file is a dotfile
142
+ * @param filePath - File path
143
+ * @returns True if file is a dotfile
144
+ */
145
+ declare function isDotFile(filePath: string): boolean;
146
+ /**
147
+ * Normalize file extension (ensure it starts with a dot)
148
+ * @param ext - File extension
149
+ * @returns Normalized extension
150
+ */
151
+ declare function normalizeExtension(ext: string): string;
152
+ /**
153
+ * Check if file has specific extension
154
+ * @param filePath - File path
155
+ * @param extensions - Extension or array of extensions to check
156
+ * @returns True if file has one of the extensions
157
+ */
158
+ declare function hasExtension(filePath: string, extensions: string | string[]): boolean;
159
+ /**
160
+ * Group files by extension
161
+ * @param filePaths - Array of file paths
162
+ * @returns Object with extensions as keys and file paths as values
163
+ */
164
+ declare function groupByExtension(filePaths: string[]): Record<string, string[]>;
165
+
166
+ declare const files_BYTE_STRING_PATTERN: typeof BYTE_STRING_PATTERN;
167
+ type files_GetFilesOptions = GetFilesOptions;
168
+ declare const files_formatBytes: typeof formatBytes;
169
+ declare const files_getBaseName: typeof getBaseName;
170
+ declare const files_getDirName: typeof getDirName;
171
+ declare const files_getExtension: typeof getExtension;
172
+ declare const files_getFileSize: typeof getFileSize;
173
+ declare const files_getFileSizeFormatted: typeof getFileSizeFormatted;
174
+ declare const files_getFiles: typeof getFiles;
175
+ declare const files_groupByExtension: typeof groupByExtension;
176
+ declare const files_hasExtension: typeof hasExtension;
177
+ declare const files_isDirectory: typeof isDirectory;
178
+ declare const files_isDotFile: typeof isDotFile;
179
+ declare const files_isFile: typeof isFile;
180
+ declare const files_normalizeExtension: typeof normalizeExtension;
181
+ declare const files_parseBytes: typeof parseBytes;
182
+ declare const files_parseFilePath: typeof parseFilePath;
183
+ declare namespace files {
184
+ export { files_BYTE_STRING_PATTERN as BYTE_STRING_PATTERN, files_formatBytes as formatBytes, files_getBaseName as getBaseName, files_getDirName as getDirName, files_getExtension as getExtension, files_getFileSize as getFileSize, files_getFileSizeFormatted as getFileSizeFormatted, files_getFiles as getFiles, files_groupByExtension as groupByExtension, files_hasExtension as hasExtension, files_isDirectory as isDirectory, files_isDotFile as isDotFile, files_isFile as isFile, files_normalizeExtension as normalizeExtension, files_parseBytes as parseBytes, files_parseFilePath as parseFilePath };
185
+ export type { files_GetFilesOptions as GetFilesOptions };
186
+ }
187
+
188
+ export { files as FileUtils };
@@ -1,2 +1,2 @@
1
- import{a as s}from"../arrays-BkHBzTDO.mjs";import{m as e}from"../mime-types-D_K53zgk.mjs";import{n as a}from"../numbers-D2K-8sJL.mjs";import{o as f}from"../objects--cO_X3EV.mjs";import{r as x}from"../random-DbidGSrQ.mjs";import{r as n}from"../runtime-DY-8W6Jr.mjs";import{s as u}from"../strings-B0BRwNX9.mjs";import{t as R}from"../time-DmJNWZeL.mjs";import"../constants/time.mjs";export{s as ArrayUtils,e as MimeTypeUtils,a as NumberUtils,f as ObjectUtils,x as RandomUtils,n as RuntimeUtils,u as StringUtils,R as TimeUtils};
1
+ import{a as e}from"../arrays-6DA6GfsQ.mjs";import{f as a}from"../files-DzKYei0a.mjs";import{m as l}from"../mime-types-D_K53zgk.mjs";import{n as U}from"../numbers-lJ6gwIpk.mjs";import{o as b}from"../objects-VXf3mqE5.mjs";import{r as y}from"../random-ihslkInn.mjs";import{r as T}from"../runtime-CE36Va0l.mjs";import{s as d}from"../strings-CrzGdnZH.mjs";import{t as j}from"../time-DmJNWZeL.mjs";import"node:fs";import"node:path";import"../constants/bytes.mjs";import"../constants/time.mjs";export{e as ArrayUtils,a as FileUtils,l as MimeTypeUtils,U as NumberUtils,b as ObjectUtils,y as RandomUtils,T as RuntimeUtils,d as StringUtils,j as TimeUtils};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- export { M as MimeKind, a as MimeKindWithSafe, c as archiveMimeTypes, b as audioMimeTypes, d as documentMimeTypes, g as getInputAccept, i as imageMimeTypes, k as inlineContentDispositionMimeTypes, f as isAllowedMimeType, h as isInlineContentDisposition, e as mimeTypeMap, j as mimeTypeResolver, s as safeMimeTypes, v as videoMimeTypes } from '../mime-types-Bjt4NvnE.cjs';
1
+ export { M as MimeKind, a as MimeKindWithSafe, c as archiveMimeTypes, b as audioMimeTypes, d as documentMimeTypes, g as getInputAccept, i as imageMimeTypes, k as inlineContentDispositionMimeTypes, f as isAllowedMimeType, h as isInlineContentDisposition, e as mimeTypeMap, j as mimeTypeResolver, s as safeMimeTypes, v as videoMimeTypes } from '../mime-types-Dajfhq2c.cjs';
@@ -1 +1 @@
1
- export { M as MimeKind, a as MimeKindWithSafe, c as archiveMimeTypes, b as audioMimeTypes, d as documentMimeTypes, g as getInputAccept, i as imageMimeTypes, k as inlineContentDispositionMimeTypes, f as isAllowedMimeType, h as isInlineContentDisposition, e as mimeTypeMap, j as mimeTypeResolver, s as safeMimeTypes, v as videoMimeTypes } from '../mime-types-Bjt4NvnE.mjs';
1
+ export { M as MimeKind, a as MimeKindWithSafe, c as archiveMimeTypes, b as audioMimeTypes, d as documentMimeTypes, g as getInputAccept, i as imageMimeTypes, k as inlineContentDispositionMimeTypes, f as isAllowedMimeType, h as isInlineContentDisposition, e as mimeTypeMap, j as mimeTypeResolver, s as safeMimeTypes, v as videoMimeTypes } from '../mime-types-Dajfhq2c.mjs';
@@ -1,2 +1,2 @@
1
- "use strict";var a=require("../numbers-Du__2-8Y.cjs");exports.INT32_MAX=a.INT32_MAX,exports.INT32_MIN=a.INT32_MIN,exports.INT64_MAX=a.INT64_MAX,exports.INT64_MIN=a.INT64_MIN,exports.bigIntSerializationHelper=a.bigIntSerializationHelper,exports.calculateMean=a.calculateMean,exports.calculateMedian=a.calculateMedian,exports.calculateStandardDeviation=a.calculateStandardDeviation,exports.calculateVariance=a.calculateVariance,exports.isEven=a.isEven,exports.isFloat=a.isFloat,exports.isInt=a.isInt,exports.isOdd=a.isOdd,exports.roundTo=a.roundTo;
1
+ "use strict";var a=require("../numbers-B_mptknO.cjs");exports.INT32_MAX=a.INT32_MAX,exports.INT32_MIN=a.INT32_MIN,exports.INT64_MAX=a.INT64_MAX,exports.INT64_MIN=a.INT64_MIN,exports.average=a.average,exports.bigIntSerializationHelper=a.bigIntSerializationHelper,exports.calculateMean=a.calculateMean,exports.calculateMedian=a.calculateMedian,exports.calculateStandardDeviation=a.calculateStandardDeviation,exports.calculateVariance=a.calculateVariance,exports.clamp=a.clamp,exports.inRange=a.inRange,exports.isEven=a.isEven,exports.isFloat=a.isFloat,exports.isInt=a.isInt,exports.isOdd=a.isOdd,exports.lerp=a.lerp,exports.percentage=a.percentage,exports.percentageOf=a.percentageOf,exports.roundTo=a.roundTo,exports.sum=a.sum;
2
2
  //# sourceMappingURL=numbers.cjs.map
@@ -1 +1 @@
1
- export { I as INT32_MAX, d as INT32_MIN, e as INT64_MAX, f as INT64_MIN, l as bigIntSerializationHelper, g as calculateMean, h as calculateMedian, k as calculateStandardDeviation, j as calculateVariance, b as isEven, a as isFloat, i as isInt, c as isOdd, r as roundTo } from '../numbers-CtAqd3eH.cjs';
1
+ export { I as INT32_MAX, h as INT32_MIN, j as INT64_MAX, k as INT64_MIN, g as average, u as bigIntSerializationHelper, m as calculateMean, o as calculateMedian, t as calculateStandardDeviation, q as calculateVariance, d as clamp, f as inRange, b as isEven, a as isFloat, i as isInt, c as isOdd, l as lerp, p as percentage, e as percentageOf, r as roundTo, s as sum } from '../numbers-C2680fmA.cjs';
@@ -1 +1 @@
1
- export { I as INT32_MAX, d as INT32_MIN, e as INT64_MAX, f as INT64_MIN, l as bigIntSerializationHelper, g as calculateMean, h as calculateMedian, k as calculateStandardDeviation, j as calculateVariance, b as isEven, a as isFloat, i as isInt, c as isOdd, r as roundTo } from '../numbers-CtAqd3eH.mjs';
1
+ export { I as INT32_MAX, h as INT32_MIN, j as INT64_MAX, k as INT64_MIN, g as average, u as bigIntSerializationHelper, m as calculateMean, o as calculateMedian, t as calculateStandardDeviation, q as calculateVariance, d as clamp, f as inRange, b as isEven, a as isFloat, i as isInt, c as isOdd, l as lerp, p as percentage, e as percentageOf, r as roundTo, s as sum } from '../numbers-C2680fmA.mjs';
@@ -1,2 +1,2 @@
1
- import{I as e,d as i,e as l,f as t,l as c,g as n,h as I,k as r,j as d,b as o,a as M,i as N,c as u,r as T}from"../numbers-D2K-8sJL.mjs";export{e as INT32_MAX,i as INT32_MIN,l as INT64_MAX,t as INT64_MIN,c as bigIntSerializationHelper,n as calculateMean,I as calculateMedian,r as calculateStandardDeviation,d as calculateVariance,o as isEven,M as isFloat,N as isInt,u as isOdd,T as roundTo};
1
+ import{I as e,h as i,j as l,k as n,g as t,u as c,m as r,o as I,t as o,q as d,d as p,f as u,b as g,a as M,i as N,c as T,l as m,p as _,e as f,r as v,s as b}from"../numbers-lJ6gwIpk.mjs";export{e as INT32_MAX,i as INT32_MIN,l as INT64_MAX,n as INT64_MIN,t as average,c as bigIntSerializationHelper,r as calculateMean,I as calculateMedian,o as calculateStandardDeviation,d as calculateVariance,p as clamp,u as inRange,g as isEven,M as isFloat,N as isInt,T as isOdd,m as lerp,_ as percentage,f as percentageOf,v as roundTo,b as sum};
2
2
  //# sourceMappingURL=numbers.mjs.map
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../objects-CnGoVkh6.cjs");exports.deepClone=e.deepClone,exports.deepMerge=e.deepMerge,exports.getNestedValue=e.getNestedValue,exports.isEmptyObject=e.isEmptyObject,exports.isObject=e.isObject;
1
+ "use strict";var e=require("../objects-wcO6hNA8.cjs");exports.deepClone=e.deepClone,exports.deepMerge=e.deepMerge,exports.flattenObject=e.flattenObject,exports.getNestedValue=e.getNestedValue,exports.isEmptyObject=e.isEmptyObject,exports.isObject=e.isObject,exports.mapKeys=e.mapKeys,exports.mapValues=e.mapValues,exports.objectKeys=e.objectKeys,exports.omit=e.omit,exports.pick=e.pick,exports.setNestedValue=e.setNestedValue;
2
2
  //# sourceMappingURL=objects.cjs.map
@@ -1 +1 @@
1
- export { G as GenericObject, O as ObjectChange, d as deepClone, b as deepMerge, g as getNestedValue, a as isEmptyObject, i as isObject } from '../objects-cf8j7rS8.cjs';
1
+ export { G as GenericObject, d as deepClone, b as deepMerge, f as flattenObject, g as getNestedValue, a as isEmptyObject, i as isObject, h as mapKeys, m as mapValues, e as objectKeys, c as omit, p as pick, s as setNestedValue } from '../objects-fiFExjsf.cjs';
@@ -1 +1 @@
1
- export { G as GenericObject, O as ObjectChange, d as deepClone, b as deepMerge, g as getNestedValue, a as isEmptyObject, i as isObject } from '../objects-cf8j7rS8.mjs';
1
+ export { G as GenericObject, d as deepClone, b as deepMerge, f as flattenObject, g as getNestedValue, a as isEmptyObject, i as isObject, h as mapKeys, m as mapValues, e as objectKeys, c as omit, p as pick, s as setNestedValue } from '../objects-fiFExjsf.mjs';
@@ -1,2 +1,2 @@
1
- import{d as a,b as t,g as d,a as p,i as b}from"../objects--cO_X3EV.mjs";export{a as deepClone,t as deepMerge,d as getNestedValue,p as isEmptyObject,b as isObject};
1
+ import{d as a,b as t,f as p,g as c,a as m,i as b,h as d,m as i,e as l,c as o,p as j,s as f}from"../objects-VXf3mqE5.mjs";export{a as deepClone,t as deepMerge,p as flattenObject,c as getNestedValue,m as isEmptyObject,b as isObject,d as mapKeys,i as mapValues,l as objectKeys,o as omit,j as pick,f as setNestedValue};
2
2
  //# sourceMappingURL=objects.mjs.map
@@ -1,2 +1,2 @@
1
- "use strict";var a=require("../random-D1e1NTOt.cjs");exports.randomBoolean=a.randomBoolean,exports.randomFloat=a.randomFloat,exports.randomInt=a.randomInt,exports.randomItem=a.randomItem,exports.randomKey=a.randomKey,exports.randomString=a.randomString,exports.randomValue=a.randomValue;
1
+ "use strict";var a=require("../random-668tofPV.cjs");exports.randomBoolean=a.randomBoolean,exports.randomColor=a.randomColor,exports.randomDate=a.randomDate,exports.randomEnum=a.randomEnum,exports.randomFloat=a.randomFloat,exports.randomHex=a.randomHex,exports.randomInt=a.randomInt,exports.randomItem=a.randomItem,exports.randomKey=a.randomKey,exports.randomString=a.randomString,exports.randomUUID=a.randomUUID,exports.randomValue=a.randomValue,exports.sample=a.sample,exports.weightedRandom=a.weightedRandom;
2
2
  //# sourceMappingURL=random.cjs.map
@@ -1 +1 @@
1
- export { R as RandomStringOptions, f as randomBoolean, b as randomFloat, a as randomInt, c as randomItem, d as randomKey, g as randomString, e as randomValue } from '../random-DpNyGGAZ.cjs';
1
+ export { R as RandomStringOptions, f as randomBoolean, k as randomColor, l as randomDate, j as randomEnum, b as randomFloat, h as randomHex, a as randomInt, c as randomItem, d as randomKey, g as randomString, i as randomUUID, e as randomValue, s as sample, w as weightedRandom } from '../random-BqJDZAPb.cjs';
@@ -1 +1 @@
1
- export { R as RandomStringOptions, f as randomBoolean, b as randomFloat, a as randomInt, c as randomItem, d as randomKey, g as randomString, e as randomValue } from '../random-DpNyGGAZ.mjs';
1
+ export { R as RandomStringOptions, f as randomBoolean, k as randomColor, l as randomDate, j as randomEnum, b as randomFloat, h as randomHex, a as randomInt, c as randomItem, d as randomKey, g as randomString, i as randomUUID, e as randomValue, s as sample, w as weightedRandom } from '../random-BqJDZAPb.mjs';
@@ -1,2 +1,2 @@
1
- import{f as n,b as r,a as m,c as d,d as s,g as e,e as t}from"../random-DbidGSrQ.mjs";export{n as randomBoolean,r as randomFloat,m as randomInt,d as randomItem,s as randomKey,e as randomString,t as randomValue};
1
+ import{f as m,k as n,l as r,j as s,b as d,h as e,a as t,c as l,d as g,g as i,i as I,e as f,s as h,w as p}from"../random-ihslkInn.mjs";export{m as randomBoolean,n as randomColor,r as randomDate,s as randomEnum,d as randomFloat,e as randomHex,t as randomInt,l as randomItem,g as randomKey,i as randomString,I as randomUUID,f as randomValue,h as sample,p as weightedRandom};
2
2
  //# sourceMappingURL=random.mjs.map
@@ -1,2 +1,2 @@
1
- "use strict";require("../numbers-Du__2-8Y.cjs"),require("../constants/time.cjs");var e=require("../runtime-peVFcWot.cjs");exports.awaitOrTimeout=e.awaitOrTimeout,exports.safeSetAsyncInterval=e.safeSetAsyncInterval,exports.safeSetInterval=e.safeSetInterval,exports.safeSetTimeout=e.safeSetTimeout,exports.sleep=e.sleep,exports.sleepUntil=e.sleepUntil,exports.sleepUntilOrTimeout=e.sleepUntilOrTimeout;
1
+ "use strict";require("../numbers-B_mptknO.cjs"),require("../constants/time.cjs");var e=require("../runtime-Bfs-yn_-.cjs");exports.awaitOrTimeout=e.awaitOrTimeout,exports.batchMap=e.batchMap,exports.batchMapWithRetry=e.batchMapWithRetry,exports.batchProcess=e.batchProcess,exports.executeWithConcurrency=e.executeWithConcurrency,exports.processBatches=e.processBatches,exports.safeSetAsyncInterval=e.safeSetAsyncInterval,exports.safeSetInterval=e.safeSetInterval,exports.safeSetTimeout=e.safeSetTimeout,exports.sleep=e.sleep,exports.sleepUntil=e.sleepUntil,exports.sleepUntilOrTimeout=e.sleepUntilOrTimeout;
2
2
  //# sourceMappingURL=runtime.cjs.map
@@ -1 +1 @@
1
- export { c as awaitOrTimeout, f as safeSetAsyncInterval, e as safeSetInterval, d as safeSetTimeout, s as sleep, a as sleepUntil, b as sleepUntilOrTimeout } from '../runtime-T8Kcf7Af.cjs';
1
+ export { k as BatchProcessOptions, l as BatchProcessWithRetryOptions, B as BatchResult, c as awaitOrTimeout, i as batchMap, j as batchMapWithRetry, h as batchProcess, g as executeWithConcurrency, p as processBatches, f as safeSetAsyncInterval, e as safeSetInterval, d as safeSetTimeout, s as sleep, a as sleepUntil, b as sleepUntilOrTimeout } from '../runtime-7fkN5_oL.cjs';
@@ -1 +1 @@
1
- export { c as awaitOrTimeout, f as safeSetAsyncInterval, e as safeSetInterval, d as safeSetTimeout, s as sleep, a as sleepUntil, b as sleepUntilOrTimeout } from '../runtime-T8Kcf7Af.mjs';
1
+ export { k as BatchProcessOptions, l as BatchProcessWithRetryOptions, B as BatchResult, c as awaitOrTimeout, i as batchMap, j as batchMapWithRetry, h as batchProcess, g as executeWithConcurrency, p as processBatches, f as safeSetAsyncInterval, e as safeSetInterval, d as safeSetTimeout, s as sleep, a as sleepUntil, b as sleepUntilOrTimeout } from '../runtime-7fkN5_oL.mjs';
@@ -1,2 +1,2 @@
1
- import"../numbers-D2K-8sJL.mjs";import"../constants/time.mjs";import{c as i,f as r,e as l,d as o,s as m,a as p,b as f}from"../runtime-DY-8W6Jr.mjs";export{i as awaitOrTimeout,r as safeSetAsyncInterval,l as safeSetInterval,o as safeSetTimeout,m as sleep,p as sleepUntil,f as sleepUntilOrTimeout};
1
+ import"../numbers-lJ6gwIpk.mjs";import"../constants/time.mjs";import{c as r,i as c,j as i,h as o,g as p,p as h,f as l,e as n,d as m,s as f,a as u,b}from"../runtime-CE36Va0l.mjs";export{r as awaitOrTimeout,c as batchMap,i as batchMapWithRetry,o as batchProcess,p as executeWithConcurrency,h as processBatches,l as safeSetAsyncInterval,n as safeSetInterval,m as safeSetTimeout,f as sleep,u as sleepUntil,b as sleepUntilOrTimeout};
2
2
  //# sourceMappingURL=runtime.mjs.map
@@ -1,2 +1,2 @@
1
- "use strict";var a=require("../strings-DV446vv-.cjs");exports.camelCase=a.camelCase,exports.displayArray=a.displayArray,exports.isUrl=a.isUrl,exports.kebabCase=a.kebabCase,exports.pascalCase=a.pascalCase,exports.pluralize=a.pluralize,exports.replaceTags=a.replaceTags,exports.snakeCase=a.snakeCase,exports.splitOnUppercase=a.splitOnUppercase,exports.stringifyArray=a.stringifyArray,exports.titleCase=a.titleCase,exports.truncate=a.truncate;
1
+ "use strict";var e=require("../strings-_1vAPvzS.cjs");exports.camelCase=e.camelCase,exports.capitalize=e.capitalize,exports.capitalizeWords=e.capitalizeWords,exports.countOccurrences=e.countOccurrences,exports.displayArray=e.displayArray,exports.escapeHtml=e.escapeHtml,exports.isAlpha=e.isAlpha,exports.isAlphanumeric=e.isAlphanumeric,exports.isUrl=e.isUrl,exports.kebabCase=e.kebabCase,exports.pad=e.pad,exports.pascalCase=e.pascalCase,exports.pluralize=e.pluralize,exports.replaceTags=e.replaceTags,exports.reverse=e.reverse,exports.slugify=e.slugify,exports.snakeCase=e.snakeCase,exports.splitOnUppercase=e.splitOnUppercase,exports.stringifyArray=e.stringifyArray,exports.titleCase=e.titleCase,exports.truncate=e.truncate,exports.unescapeHtml=e.unescapeHtml;
2
2
  //# sourceMappingURL=strings.cjs.map
@@ -1 +1 @@
1
- export { S as StringifyArrayOptions, e as camelCase, d as displayArray, i as isUrl, k as kebabCase, f as pascalCase, p as pluralize, r as replaceTags, b as snakeCase, g as splitOnUppercase, a as stringifyArray, c as titleCase, t as truncate } from '../strings-DhPbrpq7.cjs';
1
+ export { S as StringifyArrayOptions, n as camelCase, c as capitalize, a as capitalizeWords, d as countOccurrences, h as displayArray, e as escapeHtml, i as isAlpha, f as isAlphanumeric, w as isUrl, m as kebabCase, p as pad, o as pascalCase, j as pluralize, v as replaceTags, r as reverse, b as slugify, k as snakeCase, q as splitOnUppercase, g as stringifyArray, l as titleCase, t as truncate, u as unescapeHtml } from '../strings-jE1j-qqa.cjs';
@@ -1 +1 @@
1
- export { S as StringifyArrayOptions, e as camelCase, d as displayArray, i as isUrl, k as kebabCase, f as pascalCase, p as pluralize, r as replaceTags, b as snakeCase, g as splitOnUppercase, a as stringifyArray, c as titleCase, t as truncate } from '../strings-DhPbrpq7.mjs';
1
+ export { S as StringifyArrayOptions, n as camelCase, c as capitalize, a as capitalizeWords, d as countOccurrences, h as displayArray, e as escapeHtml, i as isAlpha, f as isAlphanumeric, w as isUrl, m as kebabCase, p as pad, o as pascalCase, j as pluralize, v as replaceTags, r as reverse, b as slugify, k as snakeCase, q as splitOnUppercase, g as stringifyArray, l as titleCase, t as truncate, u as unescapeHtml } from '../strings-jE1j-qqa.mjs';
@@ -1,2 +1,2 @@
1
- import{e,d as r,i as l,k as p,f as i,p as t,r as c,b as C,g as n,a as y,c as b,t as f}from"../strings-B0BRwNX9.mjs";export{e as camelCase,r as displayArray,l as isUrl,p as kebabCase,i as pascalCase,t as pluralize,c as replaceTags,C as snakeCase,n as splitOnUppercase,y as stringifyArray,b as titleCase,f as truncate};
1
+ import{n as e,c as r,a as l,d as i,h as p,e as c,i as t,f as n,w as u,m,p as o,o as y,j as C,v as d,r as f,b as g,k as A,q as b,g as h,l as k,t as z,u as v}from"../strings-CrzGdnZH.mjs";export{e as camelCase,r as capitalize,l as capitalizeWords,i as countOccurrences,p as displayArray,c as escapeHtml,t as isAlpha,n as isAlphanumeric,u as isUrl,m as kebabCase,o as pad,y as pascalCase,C as pluralize,d as replaceTags,f as reverse,g as slugify,A as snakeCase,b as splitOnUppercase,h as stringifyArray,k as titleCase,z as truncate,v as unescapeHtml};
2
2
  //# sourceMappingURL=strings.mjs.map
@@ -1,2 +1,2 @@
1
1
  export { TimeMagic } from '../constants/time.cjs';
2
- export { c as bigIntDurationToHumanReadable, b as hrTimeToMs, h as humanReadableMs, o as occurrencesPerInterval, u as unix, a as unixNow } from '../time-8KLG8kBO.cjs';
2
+ export { c as bigIntDurationToHumanReadable, b as hrTimeToMs, h as humanReadableMs, o as occurrencesPerInterval, u as unix, a as unixNow } from '../time-ufhllID1.cjs';
@@ -1,2 +1,2 @@
1
1
  export { TimeMagic } from '../constants/time.mjs';
2
- export { c as bigIntDurationToHumanReadable, b as hrTimeToMs, h as humanReadableMs, o as occurrencesPerInterval, u as unix, a as unixNow } from '../time-D8Wfqzu6.mjs';
2
+ export { c as bigIntDurationToHumanReadable, b as hrTimeToMs, h as humanReadableMs, o as occurrencesPerInterval, u as unix, a as unixNow } from '../time-BrLHgSth.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@md-oss/common",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -216,7 +216,7 @@
216
216
  "@types/qs": "^6.14.0",
217
217
  "qs": "^6.14.1",
218
218
  "zod": "^4.3.6",
219
- "@md-oss/config": "^0.1.6"
219
+ "@md-oss/config": "^0.1.7"
220
220
  },
221
221
  "devDependencies": {
222
222
  "@types/node": "^25.0.9",
@@ -1,2 +0,0 @@
1
- var b=Object.defineProperty;var o=(e,t)=>b(e,"name",{value:t,configurable:!0});import{t as d}from"./strings-B0BRwNX9.mjs";const i=o((e,t)=>{const r=[];if(t<=0)throw new Error("Chunk size must be greater than 0");for(let n=0;n<e.length;n+=t)r.push(e.slice(n,t+n));return r},"chunk"),u=o((e,t={})=>{let r;const{maxItems:n=-1,maxLength:a=-1,emptyOutput:g="None",joinString:c=", "}=t,f=o(s=>a===-1?s:s.length>a?d(s,a):s,"withMaxLength");if(e.length===0)r=g;else if(e.length<=n||n===-1)r=e.join(c);else{const s=e.slice(0,n),p=`and ${e.length-n} more...`;r=`${s.join(c)}, ${p}`}return f(r)},"join"),l=o(e=>e.every(t=>typeof t=="string"),"isStringArray"),y=o(e=>e.every(t=>typeof t=="number"),"isNumberArray"),h=o(e=>e.every(t=>typeof t=="boolean"),"isBooleanArray"),m=o(e=>e.every(t=>typeof t=="object"&&t!==null),"isObjectArray");var j=Object.freeze({__proto__:null,chunk:i,isBooleanArray:h,isNumberArray:y,isObjectArray:m,isStringArray:l,join:u});export{j as a,y as b,i as c,h as d,m as e,l as i,u as j};
2
- //# sourceMappingURL=arrays-BkHBzTDO.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"arrays-BkHBzTDO.mjs","sources":["../src/utils/arrays.ts"],"sourcesContent":["import { truncate } from './strings';\n\nconst chunk = <T>(arr: T[], size: number): T[][] => {\n\tconst result = [];\n\n\tif (size <= 0) {\n\t\tthrow new Error('Chunk size must be greater than 0');\n\t}\n\n\tfor (let i = 0; i < arr.length; i += size) {\n\t\tresult.push(arr.slice(i, size + i));\n\t}\n\n\treturn result;\n};\n\nconst join = <T extends unknown[]>(\n\tarr: T,\n\toptions: JoinOptions = {}\n): string => {\n\tlet output: string;\n\tconst {\n\t\tmaxItems = -1,\n\t\tmaxLength = -1,\n\t\temptyOutput = 'None',\n\t\tjoinString = ', ',\n\t} = options;\n\n\tconst withMaxLength = (str: string) => {\n\t\tif (maxLength === -1) return str;\n\t\treturn str.length > maxLength ? truncate(str, maxLength) : str;\n\t};\n\n\tif (arr.length === 0) output = emptyOutput;\n\telse if (arr.length <= maxItems || maxItems === -1) {\n\t\toutput = arr.join(joinString);\n\t} else {\n\t\tconst includedItems = arr.slice(0, maxItems);\n\t\tconst excludedItemsCount = arr.length - maxItems;\n\t\tconst excludedItemsMessage = `and ${excludedItemsCount} more...`;\n\n\t\toutput = `${includedItems.join(joinString)}, ${excludedItemsMessage}`;\n\t}\n\n\treturn withMaxLength(output);\n};\n\nconst isStringArray = (arr: unknown[]): arr is string[] =>\n\tarr.every((item) => typeof item === 'string');\nconst isNumberArray = (arr: unknown[]): arr is number[] =>\n\tarr.every((item) => typeof item === 'number');\nconst isBooleanArray = (arr: unknown[]): arr is boolean[] =>\n\tarr.every((item) => typeof item === 'boolean');\nconst isObjectArray = (arr: unknown[]): arr is Record<string, unknown>[] =>\n\tarr.every((item) => typeof item === 'object' && item !== null);\n\ntype JoinOptions = {\n\t/**\n\t * The string to join the items with\n\t * @default ', '\n\t */\n\tjoinString?: string;\n\t/**\n\t * The maximum number of (array) items to include\n\t * @default -1\n\t */\n\tmaxItems?: number;\n\t/**\n\t * The maximum length of the joined/final string\n\t * @default -1\n\t */\n\tmaxLength?: number;\n\t/**\n\t * The string that is returned if the input array is empty\n\t * @default 'None'\n\t */\n\temptyOutput?: string;\n};\n\nexport {\n\tchunk,\n\tjoin,\n\tisStringArray,\n\tisNumberArray,\n\tisBooleanArray,\n\tisObjectArray,\n\ttype JoinOptions,\n};\n"],"names":["chunk","__name","arr","size","result","i","join","options","output","maxItems","maxLength","emptyOutput","joinString","withMaxLength","str","truncate","includedItems","excludedItemsMessage","isStringArray","item","isNumberArray","isBooleanArray","isObjectArray"],"mappings":"0HAEA,MAAMA,EAAQC,EAAA,CAAIC,EAAUC,IAAwB,CACnD,MAAMC,EAAS,CAAA,EAEf,GAAID,GAAQ,EACX,MAAM,IAAI,MAAM,mCAAmC,EAGpD,QAASE,EAAI,EAAGA,EAAIH,EAAI,OAAQG,GAAKF,EACpCC,EAAO,KAAKF,EAAI,MAAMG,EAAGF,EAAOE,CAAC,CAAC,EAGnC,OAAOD,CACR,EAZc,SAcRE,EAAOL,EAAA,CACZC,EACAK,EAAuB,KACX,CACZ,IAAIC,EACJ,KAAM,CACL,SAAAC,EAAW,GACX,UAAAC,EAAY,GACZ,YAAAC,EAAc,OACd,WAAAC,EAAa,IAAA,EACVL,EAEEM,EAAgBZ,EAACa,GAClBJ,IAAc,GAAWI,EACtBA,EAAI,OAASJ,EAAYK,EAASD,EAAKJ,CAAS,EAAII,EAFtC,iBAKtB,GAAIZ,EAAI,SAAW,EAAGM,EAASG,UACtBT,EAAI,QAAUO,GAAYA,IAAa,GAC/CD,EAASN,EAAI,KAAKU,CAAU,MACtB,CACN,MAAMI,EAAgBd,EAAI,MAAM,EAAGO,CAAQ,EAErCQ,EAAuB,OADFf,EAAI,OAASO,CACc,WAEtDD,EAAS,GAAGQ,EAAc,KAAKJ,CAAU,CAAC,KAAKK,CAAoB,EACpE,CAEA,OAAOJ,EAAcL,CAAM,CAC5B,EA7Ba,QA+BPU,EAAgBjB,EAACC,GACtBA,EAAI,MAAOiB,GAAS,OAAOA,GAAS,QAAQ,EADvB,iBAEhBC,EAAgBnB,EAACC,GACtBA,EAAI,MAAOiB,GAAS,OAAOA,GAAS,QAAQ,EADvB,iBAEhBE,EAAiBpB,EAACC,GACvBA,EAAI,MAAOiB,GAAS,OAAOA,GAAS,SAAS,EADvB,kBAEjBG,EAAgBrB,EAACC,GACtBA,EAAI,MAAOiB,GAAS,OAAOA,GAAS,UAAYA,IAAS,IAAI,EADxC"}
@@ -1,43 +0,0 @@
1
- declare const chunk: <T>(arr: T[], size: number) => T[][];
2
- declare const join: <T extends unknown[]>(arr: T, options?: JoinOptions) => string;
3
- declare const isStringArray: (arr: unknown[]) => arr is string[];
4
- declare const isNumberArray: (arr: unknown[]) => arr is number[];
5
- declare const isBooleanArray: (arr: unknown[]) => arr is boolean[];
6
- declare const isObjectArray: (arr: unknown[]) => arr is Record<string, unknown>[];
7
- type JoinOptions = {
8
- /**
9
- * The string to join the items with
10
- * @default ', '
11
- */
12
- joinString?: string;
13
- /**
14
- * The maximum number of (array) items to include
15
- * @default -1
16
- */
17
- maxItems?: number;
18
- /**
19
- * The maximum length of the joined/final string
20
- * @default -1
21
- */
22
- maxLength?: number;
23
- /**
24
- * The string that is returned if the input array is empty
25
- * @default 'None'
26
- */
27
- emptyOutput?: string;
28
- };
29
-
30
- type arrays_JoinOptions = JoinOptions;
31
- declare const arrays_chunk: typeof chunk;
32
- declare const arrays_isBooleanArray: typeof isBooleanArray;
33
- declare const arrays_isNumberArray: typeof isNumberArray;
34
- declare const arrays_isObjectArray: typeof isObjectArray;
35
- declare const arrays_isStringArray: typeof isStringArray;
36
- declare const arrays_join: typeof join;
37
- declare namespace arrays {
38
- export { arrays_chunk as chunk, arrays_isBooleanArray as isBooleanArray, arrays_isNumberArray as isNumberArray, arrays_isObjectArray as isObjectArray, arrays_isStringArray as isStringArray, arrays_join as join };
39
- export type { arrays_JoinOptions as JoinOptions };
40
- }
41
-
42
- export { arrays as a, isNumberArray as b, chunk as c, isBooleanArray as d, isObjectArray as e, isStringArray as i, join as j };
43
- export type { JoinOptions as J };