2.0.0 • Published 2 years ago
qwertqwert v2.0.0
安装
npm install qwertqwert
导入
const xiaowang=require('qwertqwert');
格式化事件
//调用dataFormat对时间进行格式化
const dd=new Date()
const d=xiaowang.dataFormat(dd);
//结果 2022-10-21 17-20-55
console.log(d)
转义html中的特是字符
//进行转义
let str='<h1>我不是</h1>'
let s=xiaowang.htmlEscape()
//打印输出
console.log(s)
//反转义html的字符
//打印输出
console.log(xiaowang.unhtmlEsscape(s))
开源协议
ISC