1.0.0 • Published 5 years ago

itheoma-toolsmadongyuan v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

1.安装

npm i itheima-tools

2.引入

const itheima = require('itheoma-tools')

3.日期格式化

const str = itheima.dateFormat(new Date())
console.log(str);

4.转译

const str2 = '<h1 title = "logo"> 标题</h1>'
const str3 = itheima.htmlEscape(str2)
console.log(str3);

5.还原

const str4 = itheima.htmlUnEscape(str3)
console.log(str4);
1.0.0

5 years ago