1.0.0 • Published 1 year ago
utils-pe v1.0.0
安装
npm i utils-pe
导入
const utilsPe=require('utils-pe')
时间格式化
const d=new Date()
const newD=utilsPe.dateFormat(d)
console.log(newD) //xxxx-xx-xx xx:xx:xx
转译 HTML 中的特殊字符
const s='<h1>11235</h1>'
const newS=utilsPe.htmlEscape(s)
console.log(newS) //<h1>11235</h1>
反转译 HTML 中的特殊字符
const s='<h1>11235</h1>'
const newS=utils.htmlUnEscape(s)
console.log(newS) //<h1>11235</h1>
开源协议
ISC
1.0.0
1 year ago