1.0.2 • Published 5 months ago

lgq_npmtools v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

安装

npm i lgq_npmtools

导入

const lgq = require('lgq_tools')

格式化时间

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

转义 html 特殊字符

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

还原 HTML 中特殊字符

const str2 = lgq.htmlUnEscape(str)
console.log(str2)

开源协议

ISC

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago