Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
china-division
Advanced tools
中华人民共和国行政区划:省份、城市、区县、乡镇(街道)
文件列表 | 格式化 | 压缩版 |
---|---|---|
省份数据 | provinces.json | provinces.min.json |
城市数据 | cities.json | cities.min.json |
区县数据 | areas.json | areas.min.json |
乡镇(街道)数据 | streets.json | streets.min.json |
“省、市” 二级联动数据 | address2.json | address2.min.json |
“省、市、区” 三级联动数据 | address3.json | address3.min.json |
“省、市、区、镇” 四级联动数据 | address4.json | address4.min.json |
$ npm test
> mocha -t 5000
中华人民共和国行政区划:
✓ 省份数据
✓ 城市数据
✓ 区县数据
✓ 乡镇(街道)数据
✓ “省、市” 二级联动数据
✓ “省、市、区” 三级联动数据
✓ “省、市、区、镇” 四级联动数据
✓ “某省、某市、某县、某镇” 不存在
8 passing (12ms)
注意:
由于获取数据为同步操作,出于性能考虑,不建议使用 Node 模块这种方式。
建议 下载 JSON 文件 然后在代码里使用 require 引入,原因参考 Node.js Modules。
安装:
$ npm install --save china-division
使用:
var chinaDivision = require('china-division');
// 省份数据
var provinces = chinaDivision.provinces;
// 城市数据
var cities = chinaDivision.cities;
// 区县数据
var areas = chinaDivision.areas;
// 乡镇(街道)数据
var streets = chinaDivision.streets;
// “省、市” 二级联动数据
var address2 = chinaDivision.address2;
// “省、市、区” 三级联动数据
var address3 = chinaDivision.address3;
// “省、市、区、镇” 四级联动数据
var address4 = chinaDivision.address4;
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)this repo is released under the MIT License.
FAQs
We found that china-division demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.