npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

twzipcode-data

v2.0.0

Published

開發用中華郵政郵遞區號 / Variety format of Taiwan zipcode for developers.

Downloads

946

Readme

TwZipcode

開發用中華郵政郵遞區號 / Taiwan zipcodes for developers.

  1. 中華郵政「臺灣地區郵遞區號前3碼一覽表 103/12(Excel版)」 轉成js,方便開發時可直接引用。
  2. 英文譯名來自於地名資訊服務網「臺灣地區鄉鎮市區級以上行政區域名稱中英對照表.pdf」

Travis Coverage Status npm npm npm dependencies devDependency GitHub stars

Install

Bower

bower install twzipcode-data

npm

npm install twzipcode-data --save-dev

用法 Usage

import twzipcode from 'twzipcode-data'

// 英文
let data_en = twzipcode('en')

// 預設中文
let data = twzipcode()

// 或是傳入Accept-Language
let data_guess = twzipcode('zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3')

// 所有縣市
let counties = data.counties

// 所有郵遞區號
let zipcodes = data.zipcodes

資料結構 / Data Structure

縣市 / County Object

| 參數 | 說明 | |---------|---------------| | id | 中文名稱 | | name | 縣市名稱 |

郵遞區號 / Zipcode Object

| 參數 | 說明 | |---------|---------------| | id | 3碼郵遞區號 | | county | 縣、市或直轄市中文名稱 | | city | 鄉鎮市區中文名稱 |

Build Setup

# install dependencies
npm install

# run tests
npm run test

# build for production with minification
npm run build

i18n

  1. Create a directory in ./src/{locale}.
  2. In ./src/{locale}, add counties.js and zipcodes.js.
  3. In ./test, add integrity.test.{locale}.js.
  4. In .src/locales.js, append {locale} to export array.

See src/zh-tw.

Directory name should be lowercase(zh-tw), locale name in files should be uppercase for extra information(zh-TW).

vue-twzipcode

中華郵政郵遞區號 Vuejs components:twzipcode-vue