fast-tools-wjh

1.0.2 • Public • Published

安装

npm install fast-tools

使用

const fast = require('./fasttools/index.js');

格式化时间

//格式化时间
const dString = fast.fastlanes(new Date());
console.log(dString);

转义 html 中的特殊字符

const htmlString = '<h1 title="ccc">这是h1标签<span>123&990</span></h1>';
console.log(htmlString);
//转义
const htmlEscape = fast.htmlEscape(htmlString);
console.log(htmlEscape);
//反转义
const htmlUnEscape = fast.htmlUnEscape(htmlString);
console.log(htmlUnEscape);

开源协议

ISC

Readme

Keywords

Package Sidebar

Install

npm i fast-tools-wjh

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

2.72 kB

Total Files

5

Last publish

Collaborators

  • superman_wjh