Reference · Japanese addresses
normalizeJapaneseAddressTextfunction
Makes the text of a Japanese address uniform, as the parser reads it: widths folded, spaces tidied, numerals as
digits, and 1の2の3, 1-2-3 or any other dash written 1-2-3. The postal mark 〒 is kept.
Import it
import { normalizeJapaneseAddressText } from "@johnmorrisdotca/address-plus/jp";
Also exported from: @johnmorrisdotca/address-plus
Definition
function normalizeJapaneseAddressText(text: string): string
Parameters
| Name | Type | Description |
|---|---|---|
text | string | Japanese text. |
Returns
string
The text made uniform.
Examples
import { normalizeJapaneseAddressText } from "@johnmorrisdotca/address-plus/jp";
console.log(normalizeJapaneseAddressText("〒100-0005 東京都千代田区丸の内一丁目二番三号"));
// → "〒100-0005 東京都千代田区丸の内1丁目2番3号"〒100-0005 東京都千代田区丸の内1丁目2番3号What it prints (run when this page was built)