1.0.0 • Published 2 years ago

akai-tools v1.0.0

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

安装

  npm install akai-tools

导入

const akai = require('akai-tools')

格式化时间

// 调用 dateFormat 对时间进行格式化
const = akai.dateFormat(new Date())
// 结果 2021-12-26 20:45:49

转义 HTML 中的特殊字符

const htmlStr = '<h1>这是h1标签</h1>'

// 调用 akai.htmlEscape(htmlStr) 即可转换成功 还原字符串 反之亦然

开源协议

ISC