1.0.2 • Published 5 months ago
lgq_npmtools v1.0.2
安装
npm i lgq_npmtools
导入
const lgq = require('lgq_tools')
格式化时间
const dtStr = lgq.dateFormat(new Date())
转义 html 特殊字符
const htmlStr = '<h1 title="abc">这是h1标签<span>123 </span></h1>'
const str = lgq.htmlEscape(htmlStr)
console.log(str)
还原 HTML 中特殊字符
const str2 = lgq.htmlUnEscape(str)
console.log(str2)
开源协议
ISC