Skip to content

Commit 781acd0

Browse files
authored
Merge pull request #39 from klmhyeonwoo/feature/util-workspace
feat: version up to 0.0.5
2 parents f3c4e9b + 4eb7af8 commit 781acd0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A comprehensive collection of TypeScript utility functions for modern web develo
44

55
## Features
66

7-
- 🛠️ **Comprehensive**: String, object, cookie, number, validation, format, and common utilities
7+
- 🛠️ **Comprehensive**: String, object, cookie, number, validation, format, search query, and common utilities
88
- 📦 **Tree-shakable**: Import only what you need
99
- 🔒 **Type-safe**: Full TypeScript support with type definitions
1010
-**Lightweight**: Minimal dependencies and optimized for performance
@@ -31,6 +31,7 @@ import {
3131
validationUtil,
3232
commonUtil,
3333
formatUtil,
34+
searchQueryUtil,
3435
} from "kr-corekit";
3536

3637
// String utilities
@@ -68,6 +69,9 @@ const notNull = commonUtil.isNull("hello"); // false
6869
await commonUtil.sleep(1000); // Pauses execution for 1 second
6970
const copied = await commonUtil.copyToClipboard("Hello, World!"); // true if successful
7071

72+
// Search Query utilities
73+
const queryParams = searchQueryUtil.getAllQuery(); // { key: ["value1", "value2"], id: "123" }
74+
7175
// Cookie utilities
7276
cookieUtil.setCookie("theme", "dark");
7377
const theme = cookieUtil.getCookie("theme");
@@ -113,6 +117,10 @@ const formattedPhone = formatUtil.formatPhoneNumber("01012345678"); // "010-1234
113117
- `sleep(ms: number): Promise<void>` - Pauses execution for a specified number of milliseconds
114118
- `copyToClipboard(text: string): Promise<boolean>` - Copies text to the user's clipboard. Uses modern Clipboard API with fallback to legacy execCommand method. Returns true if successful, false if failed.
115119

120+
### SearchQueryUtil
121+
122+
- `getAllQuery(): Record<string, string | string[]>` - Parses the current URL's query string and returns an object with key-value pairs. Values appear as arrays when the same key is used multiple times.
123+
116124
### CookieUtil
117125

118126
- `setCookie(name: string, value: string, options?: object): void` - Sets a cookie

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kr-corekit",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "A lightweight and modern utility toolkit for JavaScript and TypeScript. kr-corekit provides essential functions for strings, arrays, objects, and more, designed for simplicity and productivity.",
55
"keywords": [
66
"javascript",

0 commit comments

Comments
 (0)