hhunitle-tools
v1.0.0
Published
提供了格式化时间, HTMLescape的功能
Downloads
6
Readme
##安装
npm install hhunitle-tools
##导入
const hhunitle = require('./hhunitle-tools')
##转换时间格式
const hhunitle = require('./hhunitle-tools')
//转换时间格式
const dtstr = hhunitle.dataFormat(new Date())
console.log(dtstr)
##转换HTML标签
const hhunitle = require('./hhunitle-tools')
//要转换的HTML标签内容
const htmlStr = hhunitle.htmlEscape('<h1 title="abc">我是标题<span>123 </span></h1>')
console.log(htmlStr)
##还原HTML标签
const hhunitle = require('./hhunitle-tools')
const str = hhunitle.htmlUnEscape(htmlStr)
console.log(str)
##开源协议 ISC