xiaochaochao-tools

1.0.0 • Public • Published

说明文档

##安装

npm install long-tools

##导入

 const index = require("./index");

##格式化时间

const datastr = index.dateFormat(new Date());
console.log(datastr);

##转义 html 的字符

//转义
const htmlstr = "<h1 title='abc'>这是h1标签<span>123&nbsp;</span></h1>";
const a = index.htmlEscape(htmlstr);

//还原
const b = index.htmlUnEscape(a);
console.log(b);

##开源协议 ISC

Readme

Keywords

Package Sidebar

Install

npm i xiaochaochao-tools

Weekly Downloads

3

Version

1.0.0

License

ISC

Unpacked Size

2.57 kB

Total Files

6

Last publish

Collaborators

  • gaolongchao