Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

china-division

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

china-division

中华人民共和国行政区划:省份、城市、区县、乡镇(街道)

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
increased by1.1%
Maintainers
1
Weekly downloads
 
Created
Source

Administrative-divisions-of-China

js-standard-style Deps npm npm GitHub license

中华人民共和国行政区划:省份、城市、区县、乡镇(街道)

JSON

文件列表下载地址
省份数据provinces.json
城市数据cities.json
区县数据areas.json
乡镇(街道)数据streets.json
“省份、城市” 二级联动数据address2.json
“省份、城市、区县” 三级联动数据address3.json
“省份、城市、区县、乡镇” 四级联动数据address4.json

Usage

抓取并导出最新数据

$ npm install

$ node output.js

preview

提示:

由于抓取乡镇数据为异步操作,每次输出的乡镇数据顺序可能不同

但是不会影响其它数据的顺序以及所有数据的完整性。

TEST

$ npm test

> mocha -t 5000

  中华人民共和国行政区划:
    ✓ 省份数据
    ✓ 城市数据
    ✓ 区县数据
    ✓ 乡镇数据
    ✓ “省份、城市” 二级联动数据
    ✓ “省份、城市、区县” 三级联动数据
    ✓ “省份、城市、区县、乡镇” 四级联动数据
    ✓ “某省、某市、某县、某镇” 不存在

  8 passing (12ms)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

this repo is released under the MIT License.

Keywords

FAQs

Package last updated on 31 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc