1.0.0 • Published 4 years ago
wangxin-npm v1.0.0
安装
npm install wangxin-npm导入
const wangxin = require("wangxin-npm");格式化时间
// 时间格式化
const dateStr = wangxin.dataFormat(new Date());转义 HTML 中的特殊字符
const htmlstr = wangxin.htmlEscape(htmlStr);
// 结果 <h1 title="abc"><sapn>123&nbsp;</span>你好,我是嫩爹</h1>还原 HTML 中的特殊字符
const htmlstr2 = wangxin.htmlUnEscape(htmlstr2);
// 结果 <h1 title="abc"><sapn>123undefinednbsp;</span>你好,我是嫩爹</h1>开源协议
ISC
// 我爱详熙1.0.0
4 years ago