Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
一款用于生成行政区划联动数据的小工具,如
[{
"name":"北京市",
"children":[{
"name":"东城区"
},{
"name":"西城区"
}]
},{
"name":"天津市",
"children":[{
"name":"和平区"
}]
}]
使用npm安装
npm install -g city
使用:
city
支持参数:
-V
--version
输出版本号-h
--help
输出菜单-l
--level level
输出指定级别行政区数据,取值1-3-k
--key name,children,code
自定义输出格式中的对象键名(必须包含三个值)-o
--output fileName
输出文件路径-j
--js varibleName
以指定变量名输出js文件(配合--output
选项写入文件)-a
--amd
以AMD规范输出js文件-m
--cmd
以CMD规范输出js文件-p
--pretty
格式化输出-s
--overseas
包含海外地区-c
--code
包含地区编码(身份证前6位)-u
--update
重新抓取原始数据-y
--pinyin
输出pinyin-i
--ignore '省|市|区|地区|县'
忽略 省|市|区|地区|县-k
--key name,children,code,pinyin
导出的键名(顺序不能改变,例如n,s,c,p)-f
--flat 'parentId'
扁平化输出,可以指定parentId参数名称 `--closed` 地区树结点默认为关闭状态
`--father` 转出指定父节点的所有子节点,不含父节点
-r
--reserve
转出以子节点为根的树,便于倒查父节点示例:
city -k n,s,c -o ./area.json -c
city -k n,s,c -o ./flat-area.json -c -f p
city -k n,s,c -o ./reverse-area.js -j reverse_area -r
2020.06.12
citydata.json
数据市辖区
数据项FAQs
The City API returns the city from a latitude and longitude using spatial mapping and data anlysis.
The npm package city receives a total of 2 weekly downloads. As such, city popularity was classified as not popular.
We found that city 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.