itheima-tools-ctz
v1.0.0
Published
提供了格式化时间,HtmlEscape相关功能
Downloads
2
Maintainers
Readme
安装
npm i itheima-tools-ctz
导入
const itheima = require('itheima-tools-ctz')
格式化时间
const newDt = itheima.dataFormat(new Date())
console.log(newDt);
转义html中的特殊字符
const html = '<h1 color="green"> 6666 66</h1>'
let htmlEscape = itheima.htmlEscape(html)
console.log(htmlEscape);
还原html中的特殊字符
let htmlUnEscape = itheima.htmlUnEscape(htmlEscape)
console.log(htmlUnEscape);
开源协议
ISCn