biu-tools
v1.0.0
Published
提供了格式化时间、HTMLEscape相关的功能
Downloads
2
Maintainers
Readme
##安装
npm install biu-tools
##导入
const index = require("biu-tools");
##格式化时间
//调用dateFormat对时间格式化
const dtStr = index.dateFormat(new Date());
//打印格式化的时间
console.log(dtstr);
##转义和还原 HTML 中的特殊字符
//带转换的HTML字符串
const htmlStr = index.htmlEscape("<>|&123");
//转换的结果是 <>|&123
console.log(htmlStr);
//还原带转换的HTML字符串
const BackHtmlStr = index.htmlEsback(htmlStr);
//转换的结果是 <>|&123
console.log(BackHtmlStr);
##开源协议 ISC