1.0.0 • Published 3 years 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
3 years ago