UNPKG

lhy-tool

Version:

提供了格式化时间、HTMLEscape相关功能

22 lines (19 loc) 314 B
## 安装 ``` npm install lhy-tool ``` ## 导入 ```js const lhy=require('lhy-tool') ``` ## 字符串转义 ```js //要换的字符串 const htmlStr = '<h1>我是h1</h1>' //调用htmlEscape进行转换 const str = lhy.htmlEscape(htmlStr) // 结果 console.log(str); ``` ## 开源协议 ISC