0.0.1 • Published 4 years ago
mxs_maks v0.0.1
Install
npm i mxs
Require
const mxs = require('mxs_maks')
Use
- 格式化日期
const res = mxs.dataFormat('2021-1-4') console.log(res) //2021-01-04 00:00:00
- 转义html标签
const res = mxs.escapeHtml('<span style = "color : red">hello</span>') console.log(res)
- 还原html标签
const htmlres = mxs.unescapeHtml('<span style = "color : red">hello</span>') console.log(htmlres);
0.0.1
4 years ago