npm install itheima-tools-zlf
js
const itheima = require('itheima-tools-zlf')
const newtime = require('./itheima-tools-zlf')
const times = newtime.formatDate(new Date())
console.log(times)
//待转换html字符串
const htmlstr = '<div title="box">hello world<span>你好啊 </span></div>';
//调用htmlEscape方法
const newHtml = htmls.htmlEscape(htmlstr);
console.log(newHtml, "字符");
// 结果 <div title="box">hello world<span>你好啊&nbsp</span></div>
const hhh = htmls.htmlUnEscape(nweHTMLL);
console.log(hhh, "反转义");
ISC