Skip to content

Latest commit

 

History

History
67 lines (49 loc) · 1.64 KB

README.md

File metadata and controls

67 lines (49 loc) · 1.64 KB

一个提供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