1.0.0 • Published 2 years ago

djf-tools v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

安装

npm install djf-tools

导入

const djf = require('djf-tools')

使用格式化时间函数示例

const dtStr = djf.dateFormat(new Date())
console.log(dtStr)

替换 html 中的字符

const htmlstr = djf.htmlEscape('<h1 title="abc">这是一个h1标签<span>123 </span></h1>')
console.log(htmlstr)

const htmlunstr = djf.htmlUnEscape(htmlstr)
console.log(htmlunstr)

开源协议

ISC

1.0.0

2 years ago