Skip to content

willson-wang/china-regions

Repository files navigation

一个提供api操作全国省市区数据的js库

Build Status Coverage Status GitHub

Directory

.
├── demo
├── dist  # production code
├── doc   # document
├── src   # source code
├── test  # unit test
├── CHANGELOG.md
└── TODO.md

Usage

npm installation

$ npm install --save china-citys

Node.js

const regions = require("china-citys");

regions.getProvinces("13") // provinceList
regions.getCitysByProvince("13") // provinceList

webpack

import regions from 'china-citys';

regions.getProvinces("13") // provinceList
regions.getCitysByProvince("13") // provinceList

Require.js

requirejs(['node_modules/china-citys/dist/index.aio.js'], function (regions) {

    regions.getProvinces("13") // provinceList
    regions.getCitysByProvince("13") // provinceList
})

Browser

<script src="node_modules/china-citys/dist/index.aio.js"></script>

<script>
    regions.getProvinces("13") // provinceList
    regions.getCitysByProvince("13") // provinceList
</script>

CHANGELOG

CHANGELOG.md

TODO

TODO.md

About

一个提供api操作全国省市区数据的js库

Resources

License

Stars

Watchers

Forks

Packages

No packages published