sunnywell
v1.0.1
Published
提供了格式化时间 HTMLescape等拆分html相关功能
Maintainers
Readme
##安装
npm install sunnywell##导入
const sunnywell=require('sunnywell')##格式化时间
//调用dateFormat对时间格式化
const dt = dateFormat(new Date())
//结果 2018-01-02 星期日 17:52:32
console.log(dt)##转译HTML中的特殊字符
const html = '<h3>"only&and"</h3>'
const htmlEscape = sunnywell.htmlEscape(html)
//输出结果 <h3>"only&and"</h3>
console.log(htmlEscape)##待还原的HTML中的特殊字符
const htmlEscape = <h3>"only&and"</h3>
const htmlunEscape = sunnywell.htmlunEscape(htmlEscape)
//输出结果'<h3>"only&and"</h3>'
console.log(htmlunEscape)##待拆分的html文件
//path:当前路径中要转换的html文件名 index.html
//files:当前路径中待写入的文件夹名称 clock文件夹
sunnywell.resolveHtml(path, files)
//输出 在clock文件夹中自动生成index.html index.css index.js文件
sunnywell.resolveHtml('index.html','clock文件夹')##开源协议 ISC
