mypackege-utils-sjx
v1.0.0
Published
这是一个自己创建的包,可以格式化日期
Downloads
7
Readme
介绍
这是一个工具包,可以格式化时间,转义HTML中的特殊字符,还原HTML中的特殊字符
安装方式
nmp i mypackege-utils-sjx
导入方法
let test = require("./index")
格式化时间
let now = new Date()
let time = test.dateFormat(now)
console.log(time)
转义HTML中的特殊字符
let html = '<h3 class="color">标题 </h3>'
let title1 = test.htmlReplace(html)
console.log(title1)
还原HTML中的特殊字符
let str = '<h3 class="color">标题 </h3>'
let title2 = test.strReplace(str)
console.log(title2)
开源协议
ISC