sxc-tools

1.0.0 • Public • Published

安装

npm install sy-package

导入

const sxc = require('sy-package')

格式化时间

const dateStr = sxc.dataFormat(new Date())

console.log(dateStr)

转义HTML中的特殊字符

const htmlStr = '

这是h1标签123 

'

const str = sxc.htmlEscape(htmlStr)

console.log(str)

还原HTML中的特殊字符

const str2 = sxc.htmlUnEscape(htmlStr)

console.log(str2);

开源协议

ISC

/sxc-tools/

    Package Sidebar

    Install

    npm i sxc-tools

    Weekly Downloads

    2

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    1.87 kB

    Total Files

    5

    Last publish

    Collaborators

    • supersxc