JSPM

itheima-tools-bsuc

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1
    • Score
      100M100P100Q56136F
    • License ISC

    bsuczong507自己的卷王

    Package Exports

    • itheima-tools-bsuc
    • itheima-tools-bsuc/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (itheima-tools-bsuc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    操作文档

    安装

    npm i ithema-tools-bsuc

    导入

    const itheima = require('itheima-tools-bsuc')

    方法

    格式化时间

    // 调用 dataFormat 方法,对时间进行格式化
    const dtStr = itheima.dateFormat(new Date())
    console.log(dtStr)

    转义HTML字符串

    const htmlStr = '<h1 title="abc">这是h1标签</h1>'
    const newStr = itheima.escapeHtml(htmlStr)
    console.log(newStr);

    还原HTML字符串

    const newUnStr = itheima.unescapeHtml(htmlStr)
    console.log(newUnStr);

    开源协议

    ISC