Skip to content

Commit 19ca5d5

Browse files
authored
Merge pull request #10 from klmhyeonwoo/feature/util-workspace
feat: building a deployment environment
2 parents 5e00e43 + 235cefa commit 19ca5d5

7 files changed

Lines changed: 53 additions & 75 deletions

File tree

.github/workflows/test_coverage.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,7 @@ jobs:
1919
- name: pnpm 설치
2020
run: npm install -g pnpm
2121
- run: pnpm install
22-
- run: pnpm test -- --reporter=junit --outputFile=vitest-report.xml
2322
- run: pnpm coverage -- package/**/*.test.ts
24-
- name: 테스트 결과 PR에 코멘트 추가하기
25-
uses: test-summary/action@v2
26-
with:
27-
paths: /home/runner/work/utils/utils/vitest-report.xml
28-
github-token: ${{ secrets.PR_WRITE_TOKEN }}
29-
if: always()
3023
- name: 테스트 커버리지 결과 PR에 코멘트 추가하기
3124
uses: davelosert/vitest-coverage-report-action@v2
3225
with:

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# @dori/utils
1+
# corekit
22

33
A comprehensive collection of TypeScript utility functions for modern web development.
44

55
## Features
66

7-
- 🛠️ **Comprehensive**: String, object, cookie, number, and validation utilities
7+
- 🛠️ **Comprehensive**: String, object, cookie, number, validation, 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
@@ -13,11 +13,11 @@ A comprehensive collection of TypeScript utility functions for modern web develo
1313
## Installation
1414

1515
```bash
16-
npm install @dori/utils
16+
npm install corekit
1717
# or
18-
pnpm add @dori/utils
18+
pnpm add corekit
1919
# or
20-
yarn add @dori/utils
20+
yarn add corekit
2121
```
2222

2323
## Usage
@@ -29,7 +29,8 @@ import {
2929
cookieUtil,
3030
numberUtil,
3131
validationUtil,
32-
} from "@dori/utils";
32+
commonUtil,
33+
} from "corekit";
3334

3435
// String utilities
3536
const escaped = stringUtil.escapeHtml("<div>Hello</div>");
@@ -47,6 +48,10 @@ const difference = numberUtil.subtract(10, 3); // 7
4748
const isValid = validationUtil.checkEmail("user@example.com"); // true
4849
const isHttpUrl = validationUtil.checkHttpUrl("https://example.com"); // true
4950

51+
// Common utilities
52+
const empty = commonUtil.isEmpty(""); // true
53+
const notEmpty = commonUtil.isEmpty("hello"); // false
54+
5055
// Cookie utilities
5156
cookieUtil.setCookie("theme", "dark");
5257
const theme = cookieUtil.getCookie("theme");
@@ -74,6 +79,10 @@ const theme = cookieUtil.getCookie("theme");
7479
- `checkEmail(email: string): boolean` - Validates email format
7580
- `checkHttpUrl(url: string): boolean` - Validates HTTP/HTTPS URL format
7681

82+
### CommonUtil
83+
84+
- `isEmpty(value: unknown): boolean` - Checks if a value is empty (null, undefined, "", 0, [], {}, empty Set/Map, NaN, or invalid Date)
85+
7786
### CookieUtil
7887

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

dori-utils-0.0.1.tgz

-43.3 KB
Binary file not shown.

package.json

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,53 @@
11
{
2-
"name": "@dori/utils",
2+
"name": "corekit",
33
"version": "0.0.1",
4-
"main": "dist/bundle/dori-utils.js",
4+
"description": "A lightweight and modern utility toolkit for JavaScript and TypeScript. CoreKit provides essential functions for strings, arrays, objects, and more, designed for simplicity and productivity.",
5+
"keywords": [
6+
"javascript",
7+
"typescript",
8+
"utilities",
9+
"utility-functions",
10+
"toolkit",
11+
"helper",
12+
"lodash",
13+
"es-toolkit",
14+
"string-utils",
15+
"array-utils",
16+
"object-utils",
17+
"functional",
18+
"corekit",
19+
"esm",
20+
"cjs"
21+
],
22+
"license": "MIT",
23+
"type": "module",
24+
"main": "dist/bundle/corekit.js",
525
"exports": {
626
".": {
727
"types": "./dist/types/index.d.ts",
8-
"require": "./dist/bundle/dori-utils.cjs",
9-
"import": "./dist/bundle/dori-utils.js"
28+
"require": "./dist/bundle/corekit.cjs",
29+
"import": "./dist/bundle/corekit.js"
1030
}
1131
},
12-
"license": "MIT",
13-
"type": "module",
1432
"scripts": {
1533
"build": "tsc && vite build",
1634
"preview": "vite preview",
1735
"test": "vitest",
1836
"coverage": "vitest run --coverage"
1937
},
38+
"repository": {
39+
"type": "git",
40+
"url": "https://github.com/klmhyeonwoo/corekit"
41+
},
42+
"bugs": {
43+
"url": "https://github.com/klmhyeonwoo/corekit/issues"
44+
},
45+
"homepage": "https://github.com/klmhyeonwoo/corekit#readme",
2046
"devDependencies": {
2147
"@types/node": "^24.3.0",
48+
"@vitest/coverage-v8": "^3.2.4",
2249
"typescript": "~5.8.3",
2350
"vite": "^7.1.2",
2451
"vitest": "^3.2.4"
25-
},
26-
"dependencies": {
27-
"@dori/utils": "file:dori-utils-0.0.1.tgz",
28-
"@vitest/coverage-v8": "^3.2.4"
2952
}
3053
}

pnpm-lock.yaml

Lines changed: 3 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export default defineConfig({
1313
outDir: "dist/bundle",
1414
lib: {
1515
entry: "package/index.ts",
16-
name: "DoriUtils",
17-
fileName: "dori-utils",
16+
name: "corekit",
17+
fileName: "corekit",
1818
},
1919
},
2020
});

vitest-report.xml

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)