1.0.0 • Published 2 years ago
jcm-tool v1.0.0
1.安装: npm i jcmtool
2.导入: const jcmtool = require("jcmtool")
3.格式化时间用法: const datastr = ttt.format(new Date()) console.log(datastr); 2023-05-01 17:14:27
4.转义html特殊字符 const htmlstr = '我是h1123 ' const result = ttt.html(htmlstr) console.log(result) <h1 title="abc">我是h1<span>123 </span></h1>
5.还原html特殊字符 const result2 = ttt.htmlescape(<h1 title="abc">我是h1<span>123 </span></h1>) console.log(result2);
6.开源协议 "ISC"
1.0.0
2 years ago