1.0.2 • Published 2 years ago
data_htmlescape v1.0.2
安装
npm install data_htmlescape
导入
const itRwj = reqiure('data_htmlescape')
格式化时间
let dt = new Date()
let newDt = itRwj.dataFormat(dt)
console.log(newDt)
转义HTML 中的特殊字符与还原HTML中的特殊字符
const htmlStr = '<h1 title="abc">这是h1标签<span>12&34</span></h1>'
const str = rwj.htmlEscape(htmlStr)
const newHtml = rwj.htmlUnEscape(str)
console.log(newHtml);
开源协议
ISC
1.0.2
2 years ago