1.0.0 • Published 3 years ago
byl-packge v1.0.0
安装
npm i byl-package
导入
const byl = require(''byl-package)
格式化时间用法
const dtStr = byl.dateFormat(new Date())
console.log(dtStr);
转义html字符
const htmlStr = '<h1>首页</h1>'
const str = byl.htmlEscape(htmlStr)
console.log(str);
解码html
const htmlStr = '<h1>首页</h1>'
const str = byl.htmlEscape(htmlStr)
const str2 = byl.unhtmlEscape(str)
console.log(str2);
1.0.0
3 years ago