mypackage_tools-wll
v1.0.0
Published
提供了格式化时间,网页格式化字符的功能
Downloads
3
Readme
安装
npm install mypackage
导入
const mypackage = require('mypackage')
格式化时间
// 调用
const dt = mypackage.dateFormat(new Date())
console.log(dt)
解析html字符
// 转义
const html = '<h1 title="ab">这是h1标签<span>123 </span></h1>'
const ret = mypackage.htmlEcape(html)
console.log(ret)
// 还原
const str2 = mypackage.htmlUnEcape(ret)
console.log(str2)
开源协议
ISC