ithm-tools

1.0.0 • Public • Published

安装

npm install ithm-tools

导入

const hm = require("./itheima-tools");const

格式化时间

const dtStr = hm.dataFormat(new Date());
console.log(dtStr);

转义 HTML 中的特殊字符

const str = hm.htmlEscape(htmlStr);
console.log(str);

还原 HTMl 的特殊字符

const str1 = hm.htmlUnEscape(htmlStr);
console.log(str1);

开源协议

ISC

/ithm-tools/

    Package Sidebar

    Install

    npm i ithm-tools

    Weekly Downloads

    0

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    2.03 kB

    Total Files

    5

    Last publish

    Collaborators

    • qiong_235