npm install ssj
const ssj = require('ssj')
// 调用dateFormat进行格式化
const time = ssj.dateFormat(new Date())
console.log(time)
// 待转换的 HTML 字符串
const htmlStr = '<h1> hello </h1>'
const str = ssj.htmlEscape(htmlStr)
console.log(str)
const str2 = ssj.htmlUEscape(str)
console.log(str2)
ISC