mypackege-utils-sjx

1.0.0 • Public • Published

介绍

这是一个工具包,可以格式化时间,转义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">标题  &nbsp;</h3>'
let title1 = test.htmlReplace(html)
console.log(title1)

还原HTML中的特殊字符

let str = '<h3 class="color">标题  &nbsp;</h3>'
let title2 = test.strReplace(str)
console.log(title2)

开源协议

ISC

Readme

Keywords

Package Sidebar

Install

npm i mypackege-utils-sjx

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

3.25 kB

Total Files

6

Last publish

Collaborators

  • koi_lucky