myself-one-create

1.0.0 • Public • Published

##安装

npm inatll myself-one-create

##导入

//调用dateFormat对时间进行格式化
const dtStr=it.dateFormat(new Date())
console.log(dtStr)

##转义HTML中的特殊字符

//转换HTML字符串
const htmlstr0='<h1 tiltle="abc">这是h1标签<span>123&nbsp</span></h1>'
const str0=it.htmlEscape(htmlstr0)
console.log(str0)

##还原HTML中的特殊字符

//还原HTML字符串
const htmlstr='&lt;h1 tiltle=&quot;abc&quot;&gt;这是h1标签&lt;span&gt;123&amp;nbsp&lt;/span&gt;&lt;/h1&gt;'
const str=it.htmlUnEscape(htmlstr)
console.log(str)

##开源协议

ISC

Readme

Keywords

Package Sidebar

Install

npm i myself-one-create

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.36 kB

Total Files

6

Last publish

Collaborators

  • iamzx