1.0.0 • Published 4 years ago

itzyj_tools v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

:安装

npm install itzyj_tools

:导入

const date = require("./itheima_tools");

:格式化时间 const dtStr = date.time(new Date()) :转义

const str = '<h1 style="color:red;">这是一段字符串</h1>'
const str1 = htmlecp.htmlstr(str)
console.log('这是转义:');
console.log(str1);
const str2 = htmlecp.htmlunStr(str1)
console.log('这是还原:');
console.log(str2)
、、、
:结果
这是转义:

<h1 style="color:red;">这是一段字符串</h1> 这是还原: