Current collected state Current
Observed since 20 Oct, 21:14 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
提供了日期格式化, html字符转译等功能
npm install 7xia-utils or npm i 7xia-utils
const 7xiaUtils = require('7xia-utils')
// 调用 dateFormat 传入一个日期 对时间格式进行处理
const date = 7xiaUtils.dateFormat(new Date())
console.log('北京时间:' + date)
// 2023-03-28 11:11:59
// 调用 htmlEscape 对HTML字符进行转译
const str = '<h1 title="a" >这是<span>h1</span>标签</h1>'
const scape = 7xiaUtils.htmlEscape(str)
console.log(8, scape)
// <h1 title="a" >这是h1标签</h1>
// 调用 htmlUnEscape 还原已转译的HTML特殊字符
const unScape = time.htmlUnEscape(scape)
console.log(11, unScape)
// <h1 title="a" >这是<span>h1</span>标签</h1>
ISC
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0Registry latest | 28 Mar 2023 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:14 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e715869433d0d30662dae13ab756fc07c0ee9e308d27fb8036c26f50e65da21e