0.0.1 • Published 5 years ago
fly-utils-123
Licence
MIT
Version
0.0.1
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Install 安装
npm i fly-utils
Require 导入
const utils = require('fly-utils')
Usage 使用方法
格式化日期
// 调用格式化日期函数 const dt = utils.formatDate('2021-1-1') console.log(dt)转义 html 标签的方法
// 调用转义 html 标签的方法 const res = utils.escapeHTML('<span style="color: red">hello</span>') console.log(res)还原 html 标签的方法
// 调用还原 html 标签的方法 const res2 = utils.unEscapeHTML('<span style="color: red">hello</span>') console.log(res2)