mirror of
https://github.com/jung-geun/NFD2NFC.git
synced 2026-06-21 04:15:14 +09:00
src/lib: 라이브러리 진입점 + 1.0.0 호환 shim
normalizeToNFC/normalizeToNFD — v1 require('@pieroot/nfd2nfc') 호환 유지.
신규 API: normalizeEntry, scan, shouldNormalize + 타입 export.
tsconfig.lib.json: declaration: true, out/lib/에 .d.ts 생성.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
9
src/lib/index.ts
Normal file
9
src/lib/index.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// 1.0.0 호환 shim — 단순 문자열 정규화
|
||||||
|
export const normalizeToNFC = (s: string): string => s.normalize('NFC');
|
||||||
|
export const normalizeToNFD = (s: string): string => s.normalize('NFD');
|
||||||
|
|
||||||
|
// 파일 시스템 API
|
||||||
|
export { normalizeEntry } from '../core/normalizer';
|
||||||
|
export { scan } from '../core/scanner';
|
||||||
|
export { shouldNormalize } from '../core/filter';
|
||||||
|
export type { RenameResult, FilterOptions, ScanEntry } from '../core/types';
|
||||||
14
tsconfig.lib.json
Normal file
14
tsconfig.lib.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "CommonJS",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"outDir": "out/lib",
|
||||||
|
"rootDir": "src",
|
||||||
|
"declaration": true,
|
||||||
|
"declarationMap": true,
|
||||||
|
"types": ["node"]
|
||||||
|
},
|
||||||
|
"include": ["src/lib/**/*", "src/core/**/*"],
|
||||||
|
"exclude": ["node_modules", "out", "dist", "src/core/__tests__"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user