1.0.0 • Published 10 months ago
itheima-tools-gdq v1.0.0
安装
npm install itheima-tools-gdq
导入
const itheima = require('itheima-tools-gdq')
格式化时间
const td = itheima.dateFormat(new Date())
console.log(td);
转换html 中的特殊字符
const htmStr = '<h1>这是h1标签<span>11 <span></h1>'
const str = itheima.htmlEscape(htmStr)
console.log('str',str);
还原html 中的特殊字符
const str2 = itheima.htmlUnEscape(str)
console.log('str2',str2);
开源协议
ISC
1.0.0
10 months ago