itheima-tools-wxl
Version:
第一个npm包
9 lines • 358 B
JavaScript
const TIME = require('../itheima-tools-wxl');
console.log(TIME.dateFormat(new Date()));
const htmlStr = '<h1 title="abc">这是h1标签<span>123 </span></h1>';
console.log(htmlStr);
const changestr = TIME.htmlEscape(htmlStr);
console.log(changestr);
const newStr = TIME.htmlUnEscape(changestr);
console.log(newStr);
console.log(newStr===htmlStr);