https://github.com/marocchino/jipcode
jipcode porting from ruby
https://github.com/marocchino/jipcode
japanese postalcode typescript zipcode
Last synced: 11 months ago
JSON representation
jipcode porting from ruby
- Host: GitHub
- URL: https://github.com/marocchino/jipcode
- Owner: marocchino
- Created: 2022-08-17T22:38:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-03T00:44:50.000Z (almost 3 years ago)
- Last Synced: 2025-01-29T10:19:07.785Z (about 1 year ago)
- Topics: japanese, postalcode, typescript, zipcode
- Language: TypeScript
- Homepage:
- Size: 2.2 MB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jipcode
This is node porting of
This library is available in the browser.
## Why?
I wanted to use the same data for server and client. But I didn't want to use the server's resources.
And there was no Japanese address library available in TypeScript, where dependency maintenanced continually.
## Installation
```
yarn add jipcode
```
or
```
npm install jipcode
```
## Usage
Basically, it has same interface with ruby version.
```ts
import { locate } from "jipcode";
await locate("1150051")
// returns [{ city: "北区", prefecture: "東京都", town: "浮間", zipcode: "1150051" }]
await locate("1150051", { prefectureCode: true })
// returns [{ city: "北区", prefecture: "東京都", prefectureCode: 13, town: "浮間", zipcode: "1150051" }]
```
- `zipcode`: 郵便番号
- `prefecture`: 都道府県
- `city`: 市区町村
- `town`: 町域番地
## Release
It will be released after ruby version release.
## Any problem?
Feel free to report issues. 😃