1.0.0 • Published 7 months ago
it-my_first_tools v1.0.0
安装
npm.install it-my_first_tools
导入
const it_tools = require('it-my_first_tools')
格式化时间
console.log(it.dateFormat(new Date()));
转义 html 的特殊字符
const htmlStr = '<h1 tittle = "abc">这是一个html<span>123 </span></h1>'
const htmlStr1 = it.htmlEscape(htmlStr)
console.log(htmlStr1);
还原 html 的特殊字符
npm get registry
console.log(it.htmlunEscape(htmlStr1));
开源协议
ISC
1.0.0
7 months ago