1.0.0 • Published 2 years ago
wwj-tools v1.0.0
安装
npm install wwj-tools
导入
const wwjTools = require('wwj-tools')
格式化时间
const dt = tools.dateFormat(new Date())
console.log(dt);
转义 HTML 中的特殊字符
const str = tools.htmlEscape('<h1>111&nbst;</h1>')
console.log(str);
还原 HTML 中的特殊字符
const str1 = tools.htmlUnEscape(str)
console.log(str1);
开源协议
ISC
1.0.0
2 years ago