Reference · Japanese addresses
kanjiNumeralsToDigitsfunction
Turns the kanji numerals that stand for block, floor or room numbers into digits: 一丁目二番三号 becomes 1丁目2番3号. A
numeral that is part of a name stays: 北一条西, 三番町, 麻布十番, 二階堂.
Import it
import { kanjiNumeralsToDigits } from "@johnmorrisdotca/address-plus/jp";
Also exported from: @johnmorrisdotca/address-plus
Definition
function kanjiNumeralsToDigits(text: string): string
Parameters
| Name | Type | Description |
|---|---|---|
text | string | Japanese text. |
Returns
string
The text with those numerals as digits.
Examples
import { kanjiNumeralsToDigits } from "@johnmorrisdotca/address-plus/jp";
console.log(kanjiNumeralsToDigits("二丁目十五番"));
// → "2丁目15番"2丁目15番What it prints (run when this page was built)