Skip to the content

address-plusアドレスプラス

Parse, validate, format and compare addresses locally, add country modules and mount an optional native form field.

address-plus extends the parse-address style with typed results, validation, formatting and country modules. About the name

Contents

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

NameTypeDescription
textstring

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)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/address-plus 1.7.0.