From 2e5d85bd965989e93060f684533d43d359f063a2 Mon Sep 17 00:00:00 2001 From: klmhyeonwoo Date: Thu, 11 Sep 2025 22:30:38 +0900 Subject: [PATCH 1/2] feat: version up to 0.0.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a436ae8..5570c0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kr-corekit", - "version": "0.0.4", + "version": "0.0.5", "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.", "keywords": [ "javascript", From 4eb7af8d32ac3912b32c52862d434cd12239666d Mon Sep 17 00:00:00 2001 From: klmhyeonwoo Date: Thu, 11 Sep 2025 22:34:27 +0900 Subject: [PATCH 2/2] feat: Added missing searchQuery utility function README --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c41747..74a5919 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A comprehensive collection of TypeScript utility functions for modern web develo ## Features -- 🛠️ **Comprehensive**: String, object, cookie, number, validation, format, and common utilities +- 🛠️ **Comprehensive**: String, object, cookie, number, validation, format, search query, and common utilities - 📦 **Tree-shakable**: Import only what you need - 🔒 **Type-safe**: Full TypeScript support with type definitions - ⚡ **Lightweight**: Minimal dependencies and optimized for performance @@ -31,6 +31,7 @@ import { validationUtil, commonUtil, formatUtil, + searchQueryUtil, } from "kr-corekit"; // String utilities @@ -68,6 +69,9 @@ const notNull = commonUtil.isNull("hello"); // false await commonUtil.sleep(1000); // Pauses execution for 1 second const copied = await commonUtil.copyToClipboard("Hello, World!"); // true if successful +// Search Query utilities +const queryParams = searchQueryUtil.getAllQuery(); // { key: ["value1", "value2"], id: "123" } + // Cookie utilities cookieUtil.setCookie("theme", "dark"); const theme = cookieUtil.getCookie("theme"); @@ -113,6 +117,10 @@ const formattedPhone = formatUtil.formatPhoneNumber("01012345678"); // "010-1234 - `sleep(ms: number): Promise` - Pauses execution for a specified number of milliseconds - `copyToClipboard(text: string): Promise` - Copies text to the user's clipboard. Uses modern Clipboard API with fallback to legacy execCommand method. Returns true if successful, false if failed. +### SearchQueryUtil + +- `getAllQuery(): Record` - 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. + ### CookieUtil - `setCookie(name: string, value: string, options?: object): void` - Sets a cookie