1.0.0 • Published 2 years ago
tctesttool v1.0.0
##安装
npm install tctesttool
##导入
const tools = require("tools")
##格式化时间
//dateFormat()方法进行格式化
const time = new Date()
const newtime = test.dateFormat(time)
console.log(newtime)
##转义HTML中的特殊字符
const htmlstr = '<h1 style="color:red">Hello</h1>'
console.log(test.htmlEscape(htmlstr))
##还原HTML中的特殊字符
console.log(test.htmlUnEscape(test.htmlEscape(htmlstr)))
##开源协议 ISC
1.0.0
2 years ago