ithma-toolss
v1.0.1
Published
提供了格式化时间,HTML escape的动画
Downloads
1
Readme
##安装
npm install itheima-tools
##导入
const itheima =require('itheima-tools')
##格式化时间
const dtStr=itheima.dataFormat(new Date()) //结果xxxx-xx-xx xx:xx:xx console.log(dtStr)
##转义HTML中的特殊文字
//待转换的HTML字符串 const htmlStr='这是h1标签123 ' const str = itheima.htmlEscape(htmlStr) //结果 console.log(str)
##还原HTML中的特殊文字
//待转换的HTML字符串 const htmlStr='......' const str = itheima.htmlunEscape(htmlStr) //结果 console.log(str)
##开源协议 ISC