data_htmlescape

1.0.2 • Public • Published

安装

npm install data_htmlescape

导入

const itRwj = reqiure('data_htmlescape')

格式化时间

let dt = new Date()
let newDt = itRwj.dataFormat(dt)
console.log(newDt)

转义HTML 中的特殊字符与还原HTML中的特殊字符

const htmlStr = '<h1 title="abc">这是h1标签<span>12&34</span></h1>'
const str = rwj.htmlEscape(htmlStr)
const newHtml = rwj.htmlUnEscape(str)
console.log(newHtml);

开源协议

ISC

Readme

Keywords

Package Sidebar

Install

npm i data_htmlescape

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

2.06 kB

Total Files

5

Last publish

Collaborators

  • rwj