itheima-tender07
v1.0.0
Published
提供了格式化时间、HTMLEscape相关的功能
Downloads
4
Readme
##安装
npm i itheima-tender07
导入
const itheima=require('itheima-tender07');
格式化时间
const time = new Date();
const timer = itheima.dateFormat(time);
console.log(timer);
转义HTML中的特殊字符
const str = '<h1>这是一个标签</h1>';
const escstr = itheima.htmlEscape(str);
console.log('这是转义html样式的输出:', escstr);