limeho

1.0.0 • Public • Published

安装

npm install limeho

导入

const limeho = require('limeho')

##格式化时间

// 创建日期对象
const dt = new Date()
// 使用formatDate()方法格式化日期
const dat = limeho.formatDate(dt)
console.log(dat)

##阻止转义和还原转义

// 设置要转义的字符串
const htmlstr = '<h2>这是一个二级标题!</h2>'
// 使用htmlEscape()方法防止转义
const str1 = limeho.htmlEscape(htmlstr)
// 使用htmlUnEscape()方法防止转义
const str2 = limeho.htmlUnEscape(str1)

##开源协议

ISC

Package Sidebar

Install

npm i limeho

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

2.14 kB

Total Files

5

Last publish

Collaborators

  • limeho