itheima-zwl-tools

1.0.0 • Public • Published

安装

npm install itheima-zwl-tools

导入

const itheima_zwl_tools = require('itheima_zwl_tools');

格式化时间

// 调用dateFormat格式化时间
const formatDate = itheima_zwl_tools.dateFormat(new Date());

HTML中的转移字符

//需要转换的HTML字符
const htmlStr = '<h1 title="anc">这是h1标签字符<span>123&nbsp;</span></h1>';

//调用htmlEscape转换
const escapeStr = itheima_zwl_tools.htmlEscape(htmlStr);

还原HTML字符

const unEscapeStr = itheima_zwl_tools.htmlUnEscape(escapeStr);

开源协议

ISC

Readme

Keywords

Package Sidebar

Install

npm i itheima-zwl-tools

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.9 kB

Total Files

5

Last publish

Collaborators

  • zwlyy