npm install Swallow-tools
const Time = require('Swallow-tools')
//调用
const newTime = Time.dateFormat()
//结果 2022-07-11 10:54:18
console.log(newTime)
const str = `<h1 italic="abc">你好<span>小黑 </span>></h1>`
const newstr = Time.htmlEscape(str)
//结果 &It;h1 italic="abc">你好&It;span>小黑&nbsp;&It;/span>>&It;/h1>
console.log(newstr)
const str = `<h1 italic="abc">你好<span>小黑 </span>></h1>`
const newstr = Time.htmlEscape(str)
console.log(Time.htmlUnEscape(newstr))
ISO