1.0.2 • Published 1 year ago

fast-tools-wjh v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

安装

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

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago