3.2.0 • Published 8 months ago

jp-postal v3.2.0

Weekly downloads
45
License
MIT
Repository
github
Last release
8 months ago

Japanese postal data from official database

There are instructions to download, rebuild and obtain the latest data from official source

Latest database update: November 2, 2022

更新日:2022年11月2日

Data source and explanation

Usage

  • Directly download and use postal.json
  • Or install module jp-postal via npm install --save jp-postal or yarn add jp-postal
  • Default export (postal.json) maps 7 digits postal code (string format) into a map whose key is prefecture name and value is array of regions under the prefecture
  • Some regions have same postal code. For example: postal code 4520961 is associated with 66 regions, 2 regions in different prefectures have same postal code 4980000 (July 1, 2020)
  • Usage example:
const postal = require('jp-postal')
console.log(JSON.stringify(postal['1130021']))
console.log(JSON.stringify(postal['0040000']))
console.log(JSON.stringify(postal['4980000']))

Output

{"東京都":["文京区本駒込"]}
{"北海道":["札幌市厚別区","札幌市清田区"]}
{"愛知県":["弥富市"],"三重県":["桑名郡木曽岬町"]}

How to rebuild

To rebuild to obtain the latest database

yarn
yarn rebuild

or

npm install
npm run rebuild

See package.json for the detailed commands

Test

yarn test
3.2.0

8 months ago

3.1.0

2 years ago

3.0.0

4 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.2.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago