@gj-kit/format
Explicit-by-construction date, number, byte, duration, and Korean currency formatting for TypeScript.
Current npm latest:
0.1.1
Use it when
Section titled “Use it when”Use it when timezone, locale, unit, and currency rendering choices must be visible in the call site.
Do not use it when
Section titled “Do not use it when”Do not use it to own application copy, user locale preference, or financial rounding policy outside its documented contract.
Golden path
Section titled “Golden path”Outcome: A stable display label whose timezone and separator are explicit at the call site.
1. Install
Section titled “1. Install”pnpm add @gj-kit/format2. Keep the app-owned boundary explicit
Section titled “2. Keep the app-owned boundary explicit”Choose the timezone and separator in code; do not let persisted or operational values inherit device defaults.
3. Start with the smallest integration
Section titled “3. Start with the smallest integration”Copy this first, then replace only the app-owned values named above.
import { formatDateTime } from '@gj-kit/format';
export const dateLabel = formatDateTime(Date.UTC(2026, 7, 26, 0, 0), { timeZone: 'Asia/Seoul', separator: '-',});Runtime and peers
Section titled “Runtime and peers”Engines: node >=20
This package has no peer dependencies.
Public subpaths
Section titled “Public subpaths”| Entry | Exported symbols |
|---|---|
Root entry |
31 |
Safety boundary
Section titled “Safety boundary”Do not rely on implicit device timezone or locale defaults for persisted or operational values.
API reference
Section titled “API reference”complete API reference contains every public function, class, type, constant, and error contract generated from release declarations. Each item shows its import path, release signature, and package version.