It's a string, but it's a number. — Numeric input formatting, done once.
문자열인데 숫자인 필드 — 콤마·커서·정렬·앞자리 0, 한 번에 끝.
The generated <span class="numkey-korean"> is unstyled — the
"원" here comes from CSS ::after. Also a pure function:
toKorean('927483041001') → 9,274억 8,304만 1,001.
A Korean draft is left alone while typing (no fight with the IME); blur
converts it — 3만5천 → 35,000. The reading and any
data-numkey-name hidden field see the parsed value even mid-draft.
data-numkey is the on-switch; data-numkey-locale is an option on top
of it that only changes how the value is drawn. The canonical value stays the same.
data-numkey가 스위치, data-numkey-locale은 그 위의
표시 옵션 — 정식 값은 그대로입니다.
<input data-numkey="2"> <!-- everyone: 1,234,567.89 -->
<input data-numkey="2" data-numkey-locale="auto"> <!-- browser language:
de → 1.234.567,89
ko → 1,234,567.89 -->
<input data-numkey="2" data-numkey-locale="de-DE"> <!-- pinned German -->
<input data-numkey-locale="auto"> <!-- ✗ nothing: no data-numkey -->
<script src="https://cdn.jsdelivr.net/npm/@devslab/numkey"></script> <input data-numkey> <!-- 1,234,567 --> <input data-numkey="2"> <!-- 1,234.56 --> <input data-numkey data-numkey-negative> <!-- minus ok -->
Vue 3 / React adapters and the full API: README. Wrong-keyboard-layout text in the same form? See numkey's sibling kokey.