npm install itheima-tools-jzh
const itheima = require("./index.js");
// 调用dateFormat对时间进行格式化
let dataStr = date.dateFormat(new Date());
console.log(dataStr); //结果
// 调用escapeHTML对字符串进行转义
let str = "<h1>hello</h1>";
let result = itheima.htmlEscape(str);
console.log(result); //结果
let htmlStr = "<h1>hello</h1>";
let htmlResult = itheima.htmlUnEscape(htmlStr);
console.log(htmlResult); //结果
ISC