1.0.0 • Published 2 years ago
node-yangs v1.0.0
安装
、、、 npm install ndoe-yangs 、、、
导入
、、、js const itheima = require('./ndoe-yangs/index') 、、、
格式化时间
、、、js const dtStr = itheima.dateFormat(new Date()) console.log(dtStr); 、、、
转义HTML字符的函数
、、、js const htmlStr = '这是h1标签123 ' const str = itheima.htmlEscape(htmlStr) 、、、
还原HTML字符的函数
、、、js const htmlStr = '<h1 title="abc">这是h1标签<span>123 </span></h1>' const str2 = itheima.htmlUnEscape(str) 、、、
开源协议
ISC
1.0.0
2 years ago