Package Exports
- itheima-tools-haoyu
- itheima-tools-haoyu/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (itheima-tools-haoyu) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
安装方式
npm install itheima-tools-haoyu
导入方式
const itheima = require('itheima-tools-haoyu')
格式化时间
const date = new Date()
const newDate = itheima.dateFormat(date)
转义HTML中的特殊字符
const htmlStr = '<h1>nihao</h1>'
console.log(date.htmlEscape(htmlStr))
开源协议
ISC