zll-tools

1.0.1 • Public • Published

安装

npm install zll-tools

导入

const zll = require('./zll-tools')

格式化时间

// 调用dataFromat函数格式化时间
const date = zll.dataFromat(new Date())

转义字符串

// 带转换的html字符串
const htmlStr ='<h1 title="abc">这是h1标签&nbsp;</h1>'
const str = zll.htmlEscape(htmlStr)
console.log(str);

还原html中的特殊字符

const str1 = zll.htmlUnEscape(str)
console.log(str1);

开源协议

ISC

Readme

Keywords

Package Sidebar

Install

npm i zll-tools

Weekly Downloads

3

Version

1.0.1

License

ISC

Unpacked Size

2.2 kB

Total Files

5

Last publish

Collaborators

  • zll-jpg