jell-utils 0.0.18 → 0.2.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.
- package/.claude/commands/tm/add-dependency.md +58 -0
- package/.claude/commands/tm/add-subtask.md +79 -0
- package/.claude/commands/tm/add-task.md +81 -0
- package/.claude/commands/tm/analyze-complexity.md +124 -0
- package/.claude/commands/tm/analyze-project.md +100 -0
- package/.claude/commands/tm/auto-implement-tasks.md +100 -0
- package/.claude/commands/tm/command-pipeline.md +80 -0
- package/.claude/commands/tm/complexity-report.md +120 -0
- package/.claude/commands/tm/convert-task-to-subtask.md +74 -0
- package/.claude/commands/tm/expand-all-tasks.md +52 -0
- package/.claude/commands/tm/expand-task.md +52 -0
- package/.claude/commands/tm/fix-dependencies.md +82 -0
- package/.claude/commands/tm/help.md +101 -0
- package/.claude/commands/tm/init-project-quick.md +49 -0
- package/.claude/commands/tm/init-project.md +53 -0
- package/.claude/commands/tm/install-taskmaster.md +118 -0
- package/.claude/commands/tm/learn.md +106 -0
- package/.claude/commands/tm/list-tasks-by-status.md +42 -0
- package/.claude/commands/tm/list-tasks-with-subtasks.md +30 -0
- package/.claude/commands/tm/list-tasks.md +46 -0
- package/.claude/commands/tm/next-task.md +69 -0
- package/.claude/commands/tm/parse-prd-with-research.md +51 -0
- package/.claude/commands/tm/parse-prd.md +52 -0
- package/.claude/commands/tm/project-status.md +67 -0
- package/.claude/commands/tm/quick-install-taskmaster.md +23 -0
- package/.claude/commands/tm/remove-all-subtasks.md +94 -0
- package/.claude/commands/tm/remove-dependency.md +65 -0
- package/.claude/commands/tm/remove-subtask.md +87 -0
- package/.claude/commands/tm/remove-subtasks.md +89 -0
- package/.claude/commands/tm/remove-task.md +110 -0
- package/.claude/commands/tm/setup-models.md +52 -0
- package/.claude/commands/tm/show-task.md +85 -0
- package/.claude/commands/tm/smart-workflow.md +58 -0
- package/.claude/commands/tm/sync-readme.md +120 -0
- package/.claude/commands/tm/tm-main.md +147 -0
- package/.claude/commands/tm/to-cancelled.md +58 -0
- package/.claude/commands/tm/to-deferred.md +50 -0
- package/.claude/commands/tm/to-done.md +47 -0
- package/.claude/commands/tm/to-in-progress.md +39 -0
- package/.claude/commands/tm/to-pending.md +35 -0
- package/.claude/commands/tm/to-review.md +43 -0
- package/.claude/commands/tm/update-single-task.md +122 -0
- package/.claude/commands/tm/update-task.md +75 -0
- package/.claude/commands/tm/update-tasks-from-id.md +111 -0
- package/.claude/commands/tm/validate-dependencies.md +72 -0
- package/.claude/commands/tm/view-models.md +52 -0
- package/.claude/settings.local.json +30 -0
- package/.cursor/commands/tm/add-dependency.md +55 -0
- package/.cursor/commands/tm/add-subtask.md +76 -0
- package/.cursor/commands/tm/add-task.md +78 -0
- package/.cursor/commands/tm/analyze-complexity.md +121 -0
- package/.cursor/commands/tm/analyze-project.md +97 -0
- package/.cursor/commands/tm/auto-implement-tasks.md +97 -0
- package/.cursor/commands/tm/command-pipeline.md +77 -0
- package/.cursor/commands/tm/complexity-report.md +117 -0
- package/.cursor/commands/tm/convert-task-to-subtask.md +71 -0
- package/.cursor/commands/tm/expand-all-tasks.md +51 -0
- package/.cursor/commands/tm/expand-task.md +49 -0
- package/.cursor/commands/tm/fix-dependencies.md +81 -0
- package/.cursor/commands/tm/help.md +98 -0
- package/.cursor/commands/tm/init-project-quick.md +46 -0
- package/.cursor/commands/tm/init-project.md +50 -0
- package/.cursor/commands/tm/install-taskmaster.md +117 -0
- package/.cursor/commands/tm/learn.md +103 -0
- package/.cursor/commands/tm/list-tasks-by-status.md +39 -0
- package/.cursor/commands/tm/list-tasks-with-subtasks.md +29 -0
- package/.cursor/commands/tm/list-tasks.md +43 -0
- package/.cursor/commands/tm/next-task.md +66 -0
- package/.cursor/commands/tm/parse-prd-with-research.md +48 -0
- package/.cursor/commands/tm/parse-prd.md +49 -0
- package/.cursor/commands/tm/project-status.md +64 -0
- package/.cursor/commands/tm/quick-install-taskmaster.md +22 -0
- package/.cursor/commands/tm/remove-all-subtasks.md +93 -0
- package/.cursor/commands/tm/remove-dependency.md +62 -0
- package/.cursor/commands/tm/remove-subtask.md +84 -0
- package/.cursor/commands/tm/remove-subtasks.md +86 -0
- package/.cursor/commands/tm/remove-task.md +107 -0
- package/.cursor/commands/tm/setup-models.md +51 -0
- package/.cursor/commands/tm/show-task.md +82 -0
- package/.cursor/commands/tm/smart-workflow.md +55 -0
- package/.cursor/commands/tm/sync-readme.md +117 -0
- package/.cursor/commands/tm/tm-main.md +146 -0
- package/.cursor/commands/tm/to-cancelled.md +55 -0
- package/.cursor/commands/tm/to-deferred.md +47 -0
- package/.cursor/commands/tm/to-done.md +44 -0
- package/.cursor/commands/tm/to-in-progress.md +36 -0
- package/.cursor/commands/tm/to-pending.md +32 -0
- package/.cursor/commands/tm/to-review.md +40 -0
- package/.cursor/commands/tm/update-single-task.md +119 -0
- package/.cursor/commands/tm/update-task.md +72 -0
- package/.cursor/commands/tm/update-tasks-from-id.md +108 -0
- package/.cursor/commands/tm/validate-dependencies.md +71 -0
- package/.cursor/commands/tm/view-models.md +51 -0
- package/.cursor/mcp.json +20 -0
- package/.cursor/rules/cursor_rules.mdc +53 -0
- package/.cursor/rules/self_improve.mdc +72 -0
- package/.cursor/rules/taskmaster/dev_workflow.mdc +424 -0
- package/.cursor/rules/taskmaster/taskmaster.mdc +573 -0
- package/.env.example +12 -0
- package/.gemini/commands/tm/add-dependency.toml +58 -0
- package/.gemini/commands/tm/add-subtask.toml +79 -0
- package/.gemini/commands/tm/add-task.toml +81 -0
- package/.gemini/commands/tm/analyze-complexity.toml +124 -0
- package/.gemini/commands/tm/analyze-project.toml +100 -0
- package/.gemini/commands/tm/auto-implement-tasks.toml +100 -0
- package/.gemini/commands/tm/command-pipeline.toml +80 -0
- package/.gemini/commands/tm/complexity-report.toml +120 -0
- package/.gemini/commands/tm/convert-task-to-subtask.toml +74 -0
- package/.gemini/commands/tm/expand-all-tasks.toml +54 -0
- package/.gemini/commands/tm/expand-task.toml +52 -0
- package/.gemini/commands/tm/fix-dependencies.toml +84 -0
- package/.gemini/commands/tm/help.toml +101 -0
- package/.gemini/commands/tm/init-project-quick.toml +49 -0
- package/.gemini/commands/tm/init-project.toml +53 -0
- package/.gemini/commands/tm/install-taskmaster.toml +120 -0
- package/.gemini/commands/tm/learn.toml +106 -0
- package/.gemini/commands/tm/list-tasks-by-status.toml +42 -0
- package/.gemini/commands/tm/list-tasks-with-subtasks.toml +32 -0
- package/.gemini/commands/tm/list-tasks.toml +46 -0
- package/.gemini/commands/tm/next-task.toml +69 -0
- package/.gemini/commands/tm/parse-prd-with-research.toml +51 -0
- package/.gemini/commands/tm/parse-prd.toml +52 -0
- package/.gemini/commands/tm/project-status.toml +67 -0
- package/.gemini/commands/tm/quick-install-taskmaster.toml +25 -0
- package/.gemini/commands/tm/remove-all-subtasks.toml +96 -0
- package/.gemini/commands/tm/remove-dependency.toml +65 -0
- package/.gemini/commands/tm/remove-subtask.toml +87 -0
- package/.gemini/commands/tm/remove-subtasks.toml +89 -0
- package/.gemini/commands/tm/remove-task.toml +110 -0
- package/.gemini/commands/tm/setup-models.toml +54 -0
- package/.gemini/commands/tm/show-task.toml +85 -0
- package/.gemini/commands/tm/smart-workflow.toml +58 -0
- package/.gemini/commands/tm/sync-readme.toml +120 -0
- package/.gemini/commands/tm/tm-main.toml +149 -0
- package/.gemini/commands/tm/to-cancelled.toml +58 -0
- package/.gemini/commands/tm/to-deferred.toml +50 -0
- package/.gemini/commands/tm/to-done.toml +47 -0
- package/.gemini/commands/tm/to-in-progress.toml +39 -0
- package/.gemini/commands/tm/to-pending.toml +35 -0
- package/.gemini/commands/tm/to-review.toml +43 -0
- package/.gemini/commands/tm/update-single-task.toml +122 -0
- package/.gemini/commands/tm/update-task.toml +75 -0
- package/.gemini/commands/tm/update-tasks-from-id.toml +111 -0
- package/.gemini/commands/tm/validate-dependencies.toml +74 -0
- package/.gemini/commands/tm/view-models.toml +54 -0
- package/.gemini/settings.json +20 -0
- package/.mcp.json +15 -0
- package/.releaserc.json +115 -0
- package/.taskmaster/CLAUDE.md +435 -0
- package/.taskmaster/config.json +44 -0
- package/.taskmaster/docs/prd.txt +584 -0
- package/.taskmaster/state.json +6 -0
- package/.taskmaster/tasks/tasks.json +304 -0
- package/.taskmaster/templates/example_prd.txt +47 -0
- package/.taskmaster/templates/example_prd_rpg.txt +511 -0
- package/CLAUDE.md +5 -0
- package/README.md +551 -0
- package/coverage/clover.xml +412 -0
- package/coverage/coverage-final.json +2 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +116 -0
- package/coverage/lcov-report/index.js.html +2884 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +896 -0
- package/internal-docs/CLAUDE.md +139 -0
- package/internal-docs/DEPLOYMENT.md +351 -0
- package/internal-docs/NPM_DEPLOYMENT_GUIDE.md +203 -0
- package/internal-docs/OBSIDIAN_PROJECT_PROMPT.md +302 -0
- package/internal-docs/TEST_RESULTS.md +153 -0
- package/internal-docs/TEST_SIMULATION.md +27 -0
- package/lib/index.d.ts +226 -39
- package/lib/index.js +767 -121
- package/package.json +54 -17
package/lib/index.d.ts
CHANGED
|
@@ -6,12 +6,11 @@ declare const util: {
|
|
|
6
6
|
*/
|
|
7
7
|
isKorean: (message: string) => boolean;
|
|
8
8
|
/**
|
|
9
|
-
* @description return deep copied object by original object.
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
12
|
-
* @returns Record<string, unknown>
|
|
9
|
+
* @description return deep copied object by original object using structuredClone or JSON fallback.
|
|
10
|
+
* @param obj object to deep clone
|
|
11
|
+
* @returns deep cloned object
|
|
13
12
|
*/
|
|
14
|
-
clone: (obj:
|
|
13
|
+
clone: <T>(obj: T) => T;
|
|
15
14
|
/**
|
|
16
15
|
* @description encode uri parsing (like < => <, > => >)
|
|
17
16
|
* @param txt Original string
|
|
@@ -19,17 +18,18 @@ declare const util: {
|
|
|
19
18
|
*/
|
|
20
19
|
parseTag: (txt: string) => string;
|
|
21
20
|
/**
|
|
22
|
-
* @description parseNumber with defaultvalue
|
|
23
|
-
* @param target original string
|
|
24
|
-
* @param defaultValue return default value
|
|
25
|
-
* @
|
|
21
|
+
* @description parseNumber with defaultvalue and proper validation
|
|
22
|
+
* @param target original string to parse
|
|
23
|
+
* @param defaultValue return default value if parsing fails
|
|
24
|
+
* @param isFloat whether to parse as float or integer
|
|
25
|
+
* @returns parsed number value or default value
|
|
26
26
|
*/
|
|
27
27
|
parseNumber: (target: string, defaultValue: number, isFloat?: boolean) => number;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
* @param target required format such as '00:11:22'
|
|
31
|
-
* @param defaultValue
|
|
32
|
-
* @returns
|
|
29
|
+
* @description parse time string to milliseconds
|
|
30
|
+
* @param target required format such as '00:11:22' (HH:MM:SS) or '11:22' (MM:SS)
|
|
31
|
+
* @param defaultValue default value if parsing fails
|
|
32
|
+
* @returns parsed milliseconds or default value
|
|
33
33
|
*/
|
|
34
34
|
parseTime: (target: string, defaultValue: number) => number;
|
|
35
35
|
/**
|
|
@@ -39,9 +39,11 @@ declare const util: {
|
|
|
39
39
|
getNowDate: () => string;
|
|
40
40
|
/**
|
|
41
41
|
* @description generate string from inputed time with korean date format.
|
|
42
|
+
* @param dateString date input (Date object or string)
|
|
43
|
+
* @param isYear whether to include year in output
|
|
42
44
|
* @returns string korean date format
|
|
43
45
|
*/
|
|
44
|
-
getKoreanDate: (dateString?: Date, isYear?: boolean) => string;
|
|
46
|
+
getKoreanDate: (dateString?: Date | string, isYear?: boolean) => string;
|
|
45
47
|
/**
|
|
46
48
|
* @description convert date to yyyy-mm-dd format string.
|
|
47
49
|
* @param date date formatted string.
|
|
@@ -64,53 +66,238 @@ declare const util: {
|
|
|
64
66
|
*/
|
|
65
67
|
replaceBetween: (str: string, txt: string, startIndex: number, endIndex: number) => string;
|
|
66
68
|
/**
|
|
67
|
-
* @description
|
|
68
|
-
* @param txt
|
|
69
|
-
* @returns
|
|
69
|
+
* @description convert string to camelCase format
|
|
70
|
+
* @param txt input string to convert (supports snake_case and space-separated)
|
|
71
|
+
* @returns camelCase formatted string
|
|
70
72
|
*/
|
|
71
73
|
toCamelCase: (txt: string) => string;
|
|
72
74
|
/**
|
|
73
|
-
* @description
|
|
74
|
-
* @param txt
|
|
75
|
-
* @returns
|
|
75
|
+
* @description convert string to snake_case format
|
|
76
|
+
* @param txt input string to convert
|
|
77
|
+
* @returns snake_case formatted string
|
|
76
78
|
*/
|
|
77
79
|
toSnakeCase: (txt: string) => string;
|
|
78
80
|
/**
|
|
79
|
-
* @description make title case string(first character capital and word space)
|
|
80
|
-
* @param txt
|
|
81
|
-
* @returns
|
|
81
|
+
* @description make title case string (first character capital and word space)
|
|
82
|
+
* @param txt input string to convert
|
|
83
|
+
* @returns title case string with proper spacing
|
|
82
84
|
*/
|
|
83
85
|
toTitleCase: (txt: string) => string;
|
|
84
86
|
/**
|
|
85
|
-
* @description br
|
|
86
|
-
* @param txt
|
|
87
|
-
* @returns
|
|
87
|
+
* @description convert HTML br tags to line breaks
|
|
88
|
+
* @param txt input string with br tags
|
|
89
|
+
* @returns string with br tags converted to newlines
|
|
88
90
|
*/
|
|
89
91
|
toText: (txt: string) => string;
|
|
90
92
|
/**
|
|
91
|
-
* @description line
|
|
92
|
-
* @param txt
|
|
93
|
-
* @returns
|
|
93
|
+
* @description convert line breaks to HTML br tags
|
|
94
|
+
* @param txt input string with newlines
|
|
95
|
+
* @returns string with newlines converted to br tags
|
|
94
96
|
*/
|
|
95
97
|
toHtml: (txt: string) => string;
|
|
96
98
|
/**
|
|
97
|
-
* @description remove
|
|
98
|
-
* @param txt string
|
|
99
|
-
* @param
|
|
100
|
-
* @returns
|
|
99
|
+
* @description safely remove HTML tags from text, preventing XSS attacks
|
|
100
|
+
* @param txt input string with HTML tags
|
|
101
|
+
* @param preserveErrorTags whether to preserve elements with 'suggestCheck' class
|
|
102
|
+
* @returns sanitized text with specified tags removed
|
|
101
103
|
*/
|
|
102
|
-
clearTag: (txt: string,
|
|
104
|
+
clearTag: (txt: string, preserveErrorTags?: boolean) => string;
|
|
103
105
|
/**
|
|
104
|
-
* @description check
|
|
105
|
-
* @param a array
|
|
106
|
-
* @param b array
|
|
107
|
-
* @returns
|
|
106
|
+
* @description check if two arrays are equal (shallow comparison)
|
|
107
|
+
* @param a first array to compare
|
|
108
|
+
* @param b second array to compare
|
|
109
|
+
* @returns true if arrays are equal, false otherwise
|
|
108
110
|
*/
|
|
109
111
|
equalArrays: (a: unknown[], b: unknown[]) => boolean;
|
|
110
112
|
/**
|
|
111
113
|
* @description check iOS device client with user agent.
|
|
112
|
-
* @returns client is iOS
|
|
114
|
+
* @returns true if client is iOS device, false otherwise
|
|
113
115
|
*/
|
|
114
116
|
isiOS: () => boolean;
|
|
117
|
+
/**
|
|
118
|
+
* @description validate Korean business registration number (사업자등록번호)
|
|
119
|
+
* @param businessNumber business registration number string (10 digits)
|
|
120
|
+
* @returns true if valid, false otherwise
|
|
121
|
+
*/
|
|
122
|
+
isBusinessNumber: (businessNumber: string) => boolean;
|
|
123
|
+
/**
|
|
124
|
+
* @description get nested object value by path string
|
|
125
|
+
* @param obj target object
|
|
126
|
+
* @param path path string (e.g., 'user.profile.name')
|
|
127
|
+
* @param defaultValue default value if path not found
|
|
128
|
+
* @returns value at path or default value
|
|
129
|
+
*/
|
|
130
|
+
getByPath: <T = unknown>(obj: Record<string, unknown>, path: string, defaultValue?: T) => T;
|
|
131
|
+
/**
|
|
132
|
+
* @description set nested object value by path string
|
|
133
|
+
* @param obj target object
|
|
134
|
+
* @param path path string (e.g., 'user.profile.name')
|
|
135
|
+
* @param value value to set
|
|
136
|
+
*/
|
|
137
|
+
setByPath: (obj: Record<string, unknown>, path: string, value: unknown) => void;
|
|
138
|
+
/**
|
|
139
|
+
* @description group array of objects by key
|
|
140
|
+
* @param array array to group
|
|
141
|
+
* @param key key to group by
|
|
142
|
+
* @returns grouped object
|
|
143
|
+
*/
|
|
144
|
+
groupBy: <T extends Record<string, unknown>>(array: T[], key: keyof T) => Record<string, T[]>;
|
|
145
|
+
/**
|
|
146
|
+
* @description extract only numbers from string
|
|
147
|
+
* @param str input string
|
|
148
|
+
* @returns string containing only numbers
|
|
149
|
+
*/
|
|
150
|
+
extractNumbers: (str: string) => string;
|
|
151
|
+
/**
|
|
152
|
+
* @description get file extension from filename or path
|
|
153
|
+
* @param filename filename or path
|
|
154
|
+
* @returns file extension without dot (e.g., 'jpg', 'pdf')
|
|
155
|
+
*/
|
|
156
|
+
getFileExtension: (filename: string) => string;
|
|
157
|
+
/**
|
|
158
|
+
* @description calculate difference between two dates
|
|
159
|
+
* @param date1 first date
|
|
160
|
+
* @param date2 second date
|
|
161
|
+
* @returns object with days, hours, minutes, seconds difference
|
|
162
|
+
*/
|
|
163
|
+
dateDiff: (date1: Date | string, date2?: Date | string) => {
|
|
164
|
+
days: number;
|
|
165
|
+
hours: number;
|
|
166
|
+
minutes: number;
|
|
167
|
+
seconds: number;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* @description deep merge two objects
|
|
171
|
+
* @param target target object
|
|
172
|
+
* @param source source object
|
|
173
|
+
* @returns merged object
|
|
174
|
+
*/
|
|
175
|
+
deepMerge: <T extends Record<string, unknown>>(target: T, source: Partial<T>) => T;
|
|
176
|
+
/**
|
|
177
|
+
* @description retry async function with exponential backoff
|
|
178
|
+
* @param fn async function to retry
|
|
179
|
+
* @param maxRetries maximum number of retries
|
|
180
|
+
* @param delay initial delay in milliseconds
|
|
181
|
+
* @returns promise with function result
|
|
182
|
+
*/
|
|
183
|
+
retry: <T>(fn: () => Promise<T>, maxRetries?: number, delay?: number) => Promise<T>;
|
|
184
|
+
/**
|
|
185
|
+
* @description search Korean string by chosung (초성)
|
|
186
|
+
* @param str target string to search in
|
|
187
|
+
* @param search chosung search string
|
|
188
|
+
* @returns true if chosung matches
|
|
189
|
+
*/
|
|
190
|
+
chosungSearch: (str: string, search: string) => boolean;
|
|
191
|
+
/**
|
|
192
|
+
* @description sort array of objects by key
|
|
193
|
+
* @param array array to sort
|
|
194
|
+
* @param key key to sort by
|
|
195
|
+
* @param order sort order ('asc' or 'desc')
|
|
196
|
+
* @returns sorted array
|
|
197
|
+
*/
|
|
198
|
+
sortBy: <T extends Record<string, unknown>>(array: T[], key: keyof T, order?: "asc" | "desc") => T[];
|
|
199
|
+
/**
|
|
200
|
+
* @description convert object to URL query string
|
|
201
|
+
* @param obj object to convert
|
|
202
|
+
* @returns query string (e.g., 'key1=value1&key2=value2')
|
|
203
|
+
*/
|
|
204
|
+
objectToQueryString: (obj: Record<string, unknown>) => string;
|
|
205
|
+
/**
|
|
206
|
+
* @description mask sensitive string (e.g., credit card, phone)
|
|
207
|
+
* @param str string to mask
|
|
208
|
+
* @param visibleStart number of visible characters at start
|
|
209
|
+
* @param visibleEnd number of visible characters at end
|
|
210
|
+
* @param maskChar character to use for masking
|
|
211
|
+
* @returns masked string
|
|
212
|
+
*/
|
|
213
|
+
maskString: (str: string, visibleStart?: number, visibleEnd?: number, maskChar?: string) => string;
|
|
214
|
+
/**
|
|
215
|
+
* @description Format date with custom format tokens
|
|
216
|
+
* @param date Date object or date string
|
|
217
|
+
* @param format Format string with tokens (YYYY, MM, DD, HH, mm, ss, ddd, dddd)
|
|
218
|
+
* @returns Formatted date string
|
|
219
|
+
*/
|
|
220
|
+
formatDateAdvanced: (date: Date | string, format: string) => string;
|
|
221
|
+
/**
|
|
222
|
+
* @description Get relative time string in Korean
|
|
223
|
+
* @param date Date object or date string
|
|
224
|
+
* @returns Korean relative time string (e.g., '방금 전', '5분 전', '어제')
|
|
225
|
+
*/
|
|
226
|
+
timeAgo: (date: Date | string) => string;
|
|
227
|
+
/**
|
|
228
|
+
* @description Get the number of days in a month
|
|
229
|
+
* @param year Year (e.g., 2025)
|
|
230
|
+
* @param month Month (1-12)
|
|
231
|
+
* @returns Number of days in the month
|
|
232
|
+
*/
|
|
233
|
+
getDaysInMonth: (year: number, month: number) => number;
|
|
234
|
+
/**
|
|
235
|
+
* @description Check if a year is a leap year
|
|
236
|
+
* @param year Year to check
|
|
237
|
+
* @returns true if leap year, false otherwise
|
|
238
|
+
*/
|
|
239
|
+
isLeapYear: (year: number) => boolean;
|
|
240
|
+
/**
|
|
241
|
+
* @description Format number with thousand separators
|
|
242
|
+
* @param num Number to format
|
|
243
|
+
* @returns Formatted string with commas
|
|
244
|
+
*/
|
|
245
|
+
formatNumber: (num: number) => string;
|
|
246
|
+
/**
|
|
247
|
+
* @description Format number as currency
|
|
248
|
+
* @param amount Amount to format
|
|
249
|
+
* @param currency Currency code (KRW, USD, EUR, JPY, CNY)
|
|
250
|
+
* @returns Formatted currency string
|
|
251
|
+
*/
|
|
252
|
+
formatCurrency: (amount: number, currency?: "KRW" | "USD" | "EUR" | "JPY" | "CNY") => string;
|
|
253
|
+
/**
|
|
254
|
+
* @description Format bytes to human-readable file size
|
|
255
|
+
* @param bytes Number of bytes
|
|
256
|
+
* @param precision Decimal precision (default: 0 for B/KB, 2 for larger)
|
|
257
|
+
* @returns Formatted file size string
|
|
258
|
+
*/
|
|
259
|
+
formatFileSize: (bytes: number, precision?: number) => string;
|
|
260
|
+
/**
|
|
261
|
+
* @description Convert number to Korean words
|
|
262
|
+
* @param num Number to convert
|
|
263
|
+
* @returns Korean number string (e.g., '천이백삼십사')
|
|
264
|
+
*/
|
|
265
|
+
numberToKorean: (num: number) => string;
|
|
266
|
+
/**
|
|
267
|
+
* @description Parse number from formatted string
|
|
268
|
+
* @param str String containing number (with commas, currency symbols, etc.)
|
|
269
|
+
* @returns Parsed number
|
|
270
|
+
*/
|
|
271
|
+
parseNumberFromString: (str: string) => number;
|
|
272
|
+
/**
|
|
273
|
+
* @description Validate email address
|
|
274
|
+
* @param email Email address to validate
|
|
275
|
+
* @returns true if valid email, false otherwise
|
|
276
|
+
*/
|
|
277
|
+
isEmail: (email: string) => boolean;
|
|
278
|
+
/**
|
|
279
|
+
* @description Validate Korean phone number
|
|
280
|
+
* @param phone Phone number to validate
|
|
281
|
+
* @returns true if valid Korean phone number, false otherwise
|
|
282
|
+
*/
|
|
283
|
+
isPhoneNumber: (phone: string) => boolean;
|
|
284
|
+
/**
|
|
285
|
+
* @description Validate URL
|
|
286
|
+
* @param url URL to validate
|
|
287
|
+
* @returns true if valid URL, false otherwise
|
|
288
|
+
*/
|
|
289
|
+
isUrl: (url: string) => boolean;
|
|
290
|
+
/**
|
|
291
|
+
* @description Format Korean phone number with hyphens
|
|
292
|
+
* @param phone Phone number to format
|
|
293
|
+
* @returns Formatted phone number
|
|
294
|
+
*/
|
|
295
|
+
formatPhoneNumber: (phone: string) => string;
|
|
296
|
+
/**
|
|
297
|
+
* @description Format Korean business registration number
|
|
298
|
+
* @param brn Business registration number
|
|
299
|
+
* @returns Formatted business number (XXX-XX-XXXXX)
|
|
300
|
+
*/
|
|
301
|
+
formatBusinessNumber: (brn: string) => string;
|
|
115
302
|
};
|
|
116
303
|
export default util;
|