itheima-mingxiujing
v1.0.0
Published
提供了格式化时间,HTMLEscape相关功能
Downloads
1
Readme
安装
npm install itheima-mingxiujing
导入
const itheima = require('itheima-mingxiujing')
格式化时间
//调用dateFormat对时间进行格式化
const dtStr = itheima.dateFormat(new Date())
console.log(dtStr)
专业html中的字符
//未转换的html字符串
const htmlStr = '<h1>你好啊</h1>'
//转换之后
const str = itheima.htmlEscape(htmlStr)
console.log(str)
##还原html字符串
const str2 = itheima.htmlunEscape(str)
console.log(str2)