1.0.0 • Published 3 years ago
itheima-tools-xm v1.0.0
安装
npm install itheima-tools-xm
导入js
const itheima =require('itheima-tools-xm')
格式化时间js
const dtStr=itheima.dateFormat(new Date()) console.log(dtStr);
转义html中特殊字符js
const str ='hellow word'
const htmlStr =itheima.htmlEscape(str) console.log(htmlStr);
还原html特殊字符js
const str ='<h1>hellow word<h1>' const Str =itheima.htmlUnEscape(htmlStr) console.log(Str);
开源协议
ISC
1.0.0
3 years ago