@fmzu/prefecture
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

@fmzu/prefecture

日本の都道府県を取り扱うライブラリです。

Install

$ bun i @fmzu/prefecture

or

$ npm i @fmzu/prefecture

Usage

基本的な使い方。

import { Prefecture } from "@fmzu/prefecture"

const prefecture = new Prefecture("TOKYO")

const nameJa = prefecture.nameJa // 東京都

const value = prefecture.value // TOKYO

日本語から変換する。

import { Prefecture } from "@fmzu/prefecture"

const prefecture = Prefecture.fromTextJa("石川") // 石川県

const nameJa = prefecture.nameJa // 石川県

const value = prefecture.value // ISHIKAWA

CommonJs

const { Prefecture } = require("@fmzu/prefecture")

const prefecture = new Prefecture("TOKYO")

const nameJa = prefecture.nameJa // 東京都

const value = prefecture.value // TOKYO

Readme

Keywords

none

Package Sidebar

Install

npm i @fmzu/prefecture

Weekly Downloads

2

Version

0.3.1

License

MIT

Unpacked Size

7.47 kB

Total Files

5

Last publish

Collaborators

  • fmzu