npm i HWC-tools
const tools = require('hwc-tools')
const time = abc.dataFormate(new Date())
console.log(time);
const htmlStr = '<h1 title="abc">我是你爹</h1>'
// 转义为字符编码
let str = abc.htmlEscape(htmlStr)
// <h1 title="abc">我是你爹</h1>
const htmlStr = '<h1 title="abc">我是你爹</h1>'
// 转义为字符编码
let str = abc.htmlEscape(htmlStr)
// <h1 title="abc">我是你爹</h1>
// 转义回html
str = abc.unEscapeHtml(str)
//<h1 title="abc">我是你爹</h1>
ISC