1.0.0 • Published 2 years ago
zhanglefeng-tools v1.0.0
安装
npm install zhang-tools
导入
const index = require('zhang-tools)
格式化时间
//调用deteFormat
const time = index.dateFormat(new Date())
console.log(time)
转义HTML字符
//调用htmlEscape
const str = index.htmlEscape(htmlstr)
console.log(str)
还原HTML
//调用htmlUnEscape
const html = index.htmlUnEscape(str)
console.log(html)
1.0.0
2 years ago