1.0.0 • Published 3 years ago

yongzheng.tools v1.0.0

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

安装

npm init -y

导入

const dataFormat = require('./src/dataFormat')
const htmlEsc = require('./src/htmlEsc')

格式化日期

console.log('格式化时间');
const che = cyz.dataFormat(new Date())
console.log(che);

测试 转译

console.log('html转换');
const str = '<h1>我是正正同学</h1>'
const yong = cyz.htmlEscape(str)
console.log(yong);

测试 还原

console.log('html还原');
const str1 = '&lt;h1&gt;我是正正同学&lt;/h1&gt;'
const zheng = cyz.htmlUnEscape(str1)
console.log(zheng);

开源协议

"license": "ISC"
1.0.0

3 years ago