1.0.0 • Published 1 year ago

myself-one-create v1.0.0

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

##安装

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

1.0.0

1 year ago