bliao-tools-test1
v1.0.1
Published
dateFormate, htmlEscape, htmlUnescape
Downloads
1
Readme
Install
npm install bliao-tools-test1
Import
const bliao = require(bliao-tools-test1);
Formate Date
const dtStr = bliao.dateFormat(new Date());
console.log(dtStr);
Escape HTML Characters
const htmlStr = '<h1 title="123">This is a h1 tag<span>abc </span></h1>';
const str1 = bliao.htmlEscape(htmlStr);
console.log(str);
Unescape HTML Characters
const str2 = bliao.htmlEscape(str1);
console.log(str2);
//Result: <h1 title="123">This is a h1 tag<span>abc </span></h1>