1.0.0 • Published 1 year ago
itheima-tools-cxl v1.0.0
安装
npm install itheima-tools
导入
const t = require('./index');
格式化时间
//调用dateFormate 对时间进行格式化
console.log(t.dateFormat(new Date));
返回:2022-11-30 10:01:35
html转移
var s = t.htmlEscape('<h1>我是h1</h1>');
console.log(s);
var s1 = t.htmlUnEscape(s);
console.log(s1);
开源协议
ISC
1.0.0
1 year ago