1.1.0 • Published 2 years ago
wzh-tools v1.1.0
##安装
npm install wzh-tools
##导入
const myTools = require("wzh-tools");
##格式化时间
const myTools = require("./wzh-tools");
console.log(myTools.dateFormat(new Date()));
##定义转义 HTML 中的特殊字符
const htmlStr = `<h1 title="abc">这是h1标签<span>123 </span></h1>`;
console.log(myTools.htmlEscape(htmlStr));
##定义还原 HTML 中的特殊字符
const htmlStr = `<h1 title="abc">这是h1标签<span>123 </span></h1>`;
console.log(myTools.htmlUnEscape(myTools.htmlEscape(htmlStr)));
##协议
ISC