cskt-wang
v1.0.0
Published
提供了格式化时间,HTMLEscape的相关功能
Downloads
3
Readme
安装
npm i cskt-wang
导入
const wang=require('cskt-wang')
格式化时间
//调用dateFormat 对时间进行格式化
const dateStr= wang.dateFormat(new Date())
//结果 2022-01-01 18:20:11
console.log(dateStr);
HTMl 字符串装换
//带装换的HTML字符串
const htmlstr='<h1 title="abc">这是h1标签<span>123 </span></h1>'
const str= wang.htmlEscape(htmlstr)
console.log(str);
//反转换的HTML字符串
console.log(wang.htmlUnEscape(str));
开源协议
ISC