
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@lx-frontend/city-data
Advanced tools
cityData 中国省市区三级联动数据
cjs
lib/index.js
安装npm包:
npm install city-data
引入使用:可参考安装包lib/index.js
,自定义名称,按需引入
// cvux格式文件,及工具函数引入
import { cvux as 自定义名称, tools } from 'city-data/lib/mobile'
const value2name = tools.value2name
const name2value = tools.name2value
// pc格式文件,及工具函数引入
import { province, city, area, tools } from 'city-data/lib/pc'
const value2name = tools.value2name
const name2value = tools.name2value
构建打包命令
npm run build
生成新的lib,但不会重新生成cvux和pc端数据npm run build:all
首先从源数据重新生成cvux和pc端数据,接着生成行的lib包源数据为back_end_data.js
,我司后端使用的源数据
生成前端数据格式的指令:
npm run build-cvux
:生成前端cvux
中使用的数据格式,./data/china_address_cvux.json
[
{
"name": "北京市",
"value": "110000"
},
...
]
npm run build-pc
:生成前端pc
中使用的数据格式,./data/china_address_pc.js
module.exports = {
province: [],
city: [],
area: []
}
china-area-data
npm包,使用国家统计局发布的省市区文件,根据我司业务情况,对数据进行了修改FAQs
We found that @lx-frontend/city-data demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 open source maintainers 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.