fast-tools-wjh
v1.0.2
Published
Fast tools for web development
Downloads
5
Readme
安装
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