1.0.0 • Published 2 years ago

itxb-datetime v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

##安装

npm install itxb-datetime

##导入

const date = require('itxb-datetime')

//格式化时间
//调用getDate()方法对时间进行格式化
const dateStr = date.getDate(new Date())

console.log(dateStr)


##转换HTML特殊字符串
//调用htmlUser()方法进行转换
const htmlSting = '<h1 class="a">比好</h1>'
const str = date.htmlUser(htmlSting)
console.log(str)

##还原 HTML 特殊字符串

const a = "<h1 class=&quota&quot>比好</h1>";
const b = date.htmlSting(a);
console.log(b);

##开源协议

ISC

1.0.0

2 years ago