ssj

1.1.0 • Public • Published

安装

npm install ssj

导入

const ssj = require('ssj')

格式化时间

// 调用dateFormat进行格式化
const time = ssj.dateFormat(new Date())
console.log(time)

转义 HTML

// 待转换的 HTML 字符串
const htmlStr = '<h1> hello </h1>'
const str = ssj.htmlEscape(htmlStr)
console.log(str)

还原 HTML

const str2 = ssj.htmlUEscape(str)
console.log(str2)

开源协议

ISC

/ssj/

    Package Sidebar

    Install

    npm i ssj

    Weekly Downloads

    0

    Version

    1.1.0

    License

    ISC

    Unpacked Size

    2.18 kB

    Total Files

    5

    Last publish

    Collaborators

    • ssj2001