txf-node-utlis
1.0.0 • Public • Published
npm install hj-node-utils
const utils = require("hj-node-utils")
const dd = utils.dateFormater(new Date())
//打印 yyyy-MM-dd HH:mm:ss
console.log(dd)
let str ="<h1 style="color:red;">你好!©<span>小黄</span></h1>"
let str2 = utils.htmlEscape(str)
//打印:<h1 style="color:red;">你好!&copy<span>小黄</span></h1>
console.log(str2)
let str ="<h1 style="color:red;">你好!&copy<span>小黄</span></h1>"
let str2 = utils.htmlUnEscape(str)
//打印:<h1 style="color:red;">你好!©<span>小黄</span></h1>
console.log(str2)
ISC
Package Sidebar
Install
Weekly Downloads