1.0.0 • Published 2 years ago
dog_bro_test_tools v1.0.0
说明
a little demo
-dog-bro-
安装
npm i dog_bro_test_tools
导入
const dog_bro = require (`./dog_bro_test_tools`)
格式化时间
const timeStr = tools.dateFormat (new Date ())
console.log (timeStr)
转义 HTML 中的特殊字符
const htmlStr = `<h1 title="abc">这里是h1标签<span>123 </span></h1>`
const str = tools.htmlEscape (htmlStr)
console.log (str)
还原 HTML 中的特殊字符
const escape = tools.htmlUnEscape (str)
console.log (escape)
开源协议
ISC
鸣谢
特别感谢我同桌对我进行的孜孜不倦的教诲,使我最终写出了这个包.
1.0.0
2 years ago