dog_bro_test_tools

1.0.0 • Public • Published

说明

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&nbsp;</span></h1>`

const str = tools.htmlEscape (htmlStr)
console.log (str)

还原 HTML 中的特殊字符

const escape = tools.htmlUnEscape (str)
console.log (escape)

开源协议

ISC

鸣谢

特别感谢我同桌对我进行的孜孜不倦的教诲,使我最终写出了这个包.

Readme

Keywords

Package Sidebar

Install

npm i dog_bro_test_tools

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.13 kB

Total Files

5

Last publish

Collaborators

  • jkr1999