1.0.0 • Published 2 years ago
xinexplorer-tools v1.0.0
##安装 ...
npm install xinexplorer-tools ...
##导入 ...js const xinexplor=require('xinexplorer-tools') ...
##格式化时间 ...js //调用dataFormat对时间格式化 const dtStr=xinexplor.dateFormat(new Date()) console.log(dtStr) //结果 2022-04-10-10:21:55 ...
##转移HTML特殊字符 ...js //定义待转换的字符串 const htmlStr='这是大冤种123&nbst' //调用方法 const str=xinexplor.htmlEscape(htmlStr) console.log(str) //结果 <h1 title="abc">这是大冤种<span>123&nbst</span></h1> ...
##还原特殊字符串 ...js const str2=xinexplor.htmlUnEscape(str) console.log(str2) //结果 这是大冤种123&nbst ...
##开源协议 ISC
1.0.0
2 years ago