1.0.0 • Published 2 years ago
xyh-tools v1.0.0
安装
npm install xyh-tools
导入
const xyh=require('xyh-tools')
格式化时间
const dataStr = xyh.dataFormat(new Date());
转义HTML中特殊字符
const htmlstr = "<h1>hello,world </h1>";
//转换
const str = xyh.htmlEscape(htmlstr);
console.log(str);
还原字符
const str1 = xyh.htmlUnEscape(str);
console.log(str1);
开源协议
ISC
1.0.0
2 years ago