1.0.0 • Published 7 months ago
maxkim-tools v1.0.0
##安装
npm install maxkim-tools
##导入
const maxkim=('maxkim-tools')
##格式化时间
//调用dateFormat对时间进行格式化
const dtStr=test.dateFormat(new Date())
console.log(dtStr)
//2025-01-14 13:41:54
##转义HTML中的特殊字符
const htmlStr='<h1>这是h1标签<span>123</span></h1>'
const res=test.htmlEscape(htmlStr)
console.log(res)
##还原HTML中的特殊字符
const res2=test.htmlUnEscape(res)
console.log(res2)
##开源协议 ISC
1.0.0
7 months ago