itheima-zwhy

1.0.0 • Public • Published

安装

npm install itheima-zwhy

导入方式

const itheima = require('itheima-zwhy')

功能1 格式化时间日期

// 调用 dateFormat 方法 格式化时间
const dt = new Date()
const newData =  itheima.dateFormat(dt);

功能2 转换HTML字符

// 调用 changeStr 方法 将HTML标签字符转化
const str = '<h1>123$456</h1>'
const newStr = itheima.changeStr(str)

功能3 还原HTML字符

// 调用 deacidizing 方法 将HTML字符还原
const str = '&lth1&gt123&amp456&lt/h1&gt'
const newHtml = time.deacidizing(str)

开源协议

ISC

Readme

Keywords

Package Sidebar

Install

npm i itheima-zwhy

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

2.37 kB

Total Files

5

Last publish

Collaborators

  • zwhy-s