mypackage-six

1.0.0 • Public • Published

安装


npm install mypackage-six

导入


const mypackage-six = ('mypackage-six')

格式化时间

const datestr = mypackage-six.dateFormat(new Date())
console.log(datestr);

转义/还原html中的特殊字符

//转义
const htmlstr = '<h1 title="abc">这是h1标签<span>13&nbsp;</span></h1>'
const newstr = mypackage-six.htmlEscape(htmlstr)
console.log(newstr);

//还原
const newhtmlstr = mypackage-six.htmlUnEscape(newstr)
console.log(newhtmlstr);

开源协议

ISC

Readme

Keywords

Package Sidebar

Install

npm i mypackage-six

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.29 kB

Total Files

5

Last publish

Collaborators

  • sixpennies