1.0.1 • Published 6 months ago

dc-tools v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

安装

npm install dc-tools

导入

const dc = require('dc-tools')

格式化时间

const dtStr = dc.dateFormat(new Date())

转义HTML中的特殊字符

const htmlstr =<h1 title="abc">这是h1标签<span>123&nbsp;</span></h1>
const str = dc.htmlEscape(htmlStr)

还原HTML字符串

const str2 = dc.htmlUnEscape(str)

开源协议

MIT

1.0.1

6 months ago

1.0.0

2 years ago