npm i cskt-wang
const wang=require('cskt-wang')
//调用dateFormat 对时间进行格式化
const dateStr= wang.dateFormat(new Date())
//结果 2022-01-01 18:20:11
console.log(dateStr);
//带装换的HTML字符串
const htmlstr='<h1 title="abc">这是h1标签<span>123 </span></h1>'
const str= wang.htmlEscape(htmlstr)
console.log(str);
//反转换的HTML字符串
console.log(wang.htmlUnEscape(str));
ISC