0.0.1 • Published 3 years ago

yqj1111111111 v0.0.1

Weekly downloads
49
License
MIT
Repository
-
Last release
3 years ago

Install

npm i yyyy

Require

const utils=require('yyyy')

Usage

`格式化日期

const m = require('./yyyy/index')
const time = new Date()

//调用格式化时间函数
const n = m.formatDate(time)

`调用转义html标签的方法

//调用转义html标签的方法
const i = m.htmlS('<h1 style ="color:red">hello <span>1213 &nbsp;</span></h1>')
console.log(i);

`调用还原html标签的方法

//调用还原html标签的方法
const ii = m.unhtmlS('&lt;h1 style =&guot;color:red&guot;&gt;hello &lt;span&gt;1213 &amp;nbsp;&lt;/span&gt;&lt;/h1&gt;')
console.log(ii);