1.0.0 • Published 2 years ago
xiaoyao-time-chu v1.0.0
安装
npm install xiaoyao-time-chu
导入
const xiao = requier('xiaoyao-time-chu')
格式化时间
const dates = xiao.dateFormat(new Date())
console.log(dates);
转义HTML 中的字符串
onst htmlstr = '<h1 title="abc">这是h1标签<span>123 </span></h1>';
const go = date.htmlEscape(htmlstr)
console.log(go);
还原HTML中的特殊字符
//待还原的字符串
const hua = date.htmlUnEscape(go)
console.log(hua);
开源协议
ISC
1.0.0
2 years ago