1.0.0 • Published 8 months ago
xxxsh2-tools v1.0.0
安装
npm install xxxsh2-tools
导入
const xxxsh2toos=request('xxxsh2-tools')
格式化时间
// 调用dateForamt 对时间进行格式化
const dtStr=xxxsh2toos.dateFormat(new Date())
转义HTML 中的特殊字符
// 带转换的 HTML 字符串
const htmlStr='<h1 title="abc">这是h1标签<span>123 </span></h1>'
// 调用HtmlEscape 方法进行转换
const str=xxxsh2toos.htmlEscape(stmlStr)
开源协议
ISC
1.0.0
8 months ago