安装 npm i itheima-tools-eahow 导入 const itheima = require('../itheima-tools-eahow'); 格式化时间方法 let dt = new Date(); itheima.dateFormat(dt); 转义HTML的特殊字符方法 let str = itheima.htmlEscape('<h1>你好<span>你也好</span> </h1>'); 特殊字符转义HTML方法 let str1 = itheima.htmlUnescape(str); 开源协议 ISC