1.1.1 • Published 1 year ago
itggheima-tools v1.1.1
安装
npm install itGGheima-tools
格式化时间
const dtStr=itGGheima.dataFormat(new Date())
console.log(dtStr);
转义HTML 的特殊字符
const htmlStr='<h1 title="abc">这是h1标签<span>123 </span></h1>'
const str=itGGheima.htmlEscape(htmlStr)
还原 HTML
const htmlStr='<h1 title="abc">这是h1标签<span>123 </span></h1>'
const str=itGGheima.htmlEscape(htmlStr)
const html = itGGheima.htmlUnEscape(str)
开源协议
ISC
1.1.1
1 year ago