heshihao-utils

1.0.0 • Public • Published

###安装 npm install heshihao-utils

###导入模块 const utils = require('heshihao-utils')

###日期时间处理函数 const dd = utils.dateFormat(new Date()) //打印yyyy-MM-dd HH:mm:ss console.log(dd)

html字符转换为转义字符

let str = '<h1 style="color:red;">你好!&copy<span>小黄</span></h1>'
let str2 = utils.htmlEscap(str)    

转义字符转换为字符

/heshihao-utils/

    Package Sidebar

    Install

    npm i heshihao-utils

    Weekly Downloads

    0

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    3.18 kB

    Total Files

    9

    Last publish

    Collaborators

    • hshlss