1.0.0 • Published 2 years ago
itheima-tools-jp v1.0.0
##安装 、、、 npm install itheima-tools-jp 、、、
##导入 const itheima=require('itheima-tools-jp') 、、、
##格式化时间 const time = new Date() const timer = itheima.dataFormat(time) console.log(timer); 、、、
##转义HTML的特殊字符 //定义带特殊字符的字符串 str = '<"2&2&2">' //调用函数转换 const htmlstr = itheima.htmlEscape(str) //输出 console.log(htmlstr); 、、、
##还原HTML的特殊字符 //带还原的字符串 const str2 = itheima.htmlUnEscape(htmlstr) console.log(str2);
##开源协议 ISC
1.0.0
2 years ago