zzwangluxin15
v1.0.0
Published
提供了时间格式化,HTML转义功能
Downloads
2
Maintainers
Readme
安装
npm install zzwangluxin18
导入
const wangluxin=require('zzwangluxin18')
格式化时间
// 调用dataFormat对时间进行格式化
const dtStr=wangluxin.dataFormat(new Data())
// 结果输出
console.log(dtStr)
// 2021-03-07 18-53-07
HTML转义字符
// 调用HTMLEscape对HTML进行转义
const str=wangluxiin.htmlEscape('<h1>开开心心的</h1>')
console.log(str)// 结果输出:<h1>开开"心心的&</h1>
const str1=wangluxiin.htmlEscape('<h1>开开"心心的&</h1>')
console.log(str1)//结果输出:<h1>开开心心的</h1>
开源协议
ISC
nrm包的安装
npm install nrm -g //安装包
nrm ls //查看镜像列表
nrm use npm //转换为npm的镜像服务器