JSPM

itheima-tender07

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

    提供了格式化时间、HTMLEscape相关的功能

    Package Exports

    • itheima-tender07

    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-tender07) 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 itheima-tender07
    

    导入

    const itheima=require('itheima-tender07');

    格式化时间

    const time = new Date();
    const timer = itheima.dateFormat(time);
    console.log(timer);

    转义HTML中的特殊字符

    const str = '<h1>这是一个标签</h1>';
    const escstr = itheima.htmlEscape(str);
    console.log('这是转义html样式的输出:', escstr);

    还原HTML中的特殊字符