itheima_lyt

1.0.0 • Public • Published

安装方式

npm install itheima_lyt

导入

const it=require('itheima_lyt')

格式化时间

<!-- 调用dataFormat对时间进行格式化 -->
const dtStr = it.dataFormat(new Date())
console.log(dtStr);

转义 HTML 中特殊字符

const htmlStr = '<h1 title="abc">这是h1标签<h1>'
const str = it.htmlEscape(htmlStr)
console.log(str)

将特殊字符复原

const str2 = it.htmlUnEscape(str)
console.log(str2);

开源协议

ISC

/itheima_lyt/

    Package Sidebar

    Install

    npm i itheima_lyt

    Weekly Downloads

    0

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    2.18 kB

    Total Files

    5

    Last publish

    Collaborators

    • 921l