itheima-tools-ljr

1.0.0 • Public • Published

安装方式

npm  install itheima-tools-ljr

导入方式

const it = require('itheima-tools-ljr')

格式化时间

// 调用 dateFormat 对时间进行格式化
const dtStr = it.dateFormat(new Date())
console.log(dtStr)

转义 HTML 中的特殊字符

const a1 = it.htmlEscape(htmlStr)
console.log(a1)

还原 HTML 中的特殊字符

const a2 = it.htmlUnEscape(str)
console.log(a2)

开源协议

"license": "ISC"

Package Sidebar

Install

npm i itheima-tools-ljr

Weekly Downloads

8

Version

1.0.0

License

ISC

Unpacked Size

2.54 kB

Total Files

5

Last publish

Collaborators

  • leijingrong