1.0.0 • Published 5 years ago
wusiwei-tools v1.0.0
1.安装
npm i wusiwei-tools
2.导入
const wsw = require('wusiwei-tools')
3.时间格式化
// 测试时间格式化
const str1 = wsw.dateFormat(new Date())
console.log(str1);
4.转义
// 测试html转义
const str2 = wsw.htmlEscape('<h1 title="hello">hello</h1>')
console.log(str2);
5.还原
// 测试还原html
const str3 = wsw.htmlUnEscape('<>')
console.log(str3);
6.开源协议
ISC
1.0.0
5 years ago