1.0.0 • Published 2 years ago
utils-for-june v1.0.0
安装
npm install utils-for-june
导入
const juneUtils = require('utils-for-june')
方法
// 将阿拉伯数字 转换成 中文大写数字
const str = arabicToChinese(1234567890)
console.log(str) // 壹拾贰亿叁仟肆佰伍拾陆万柒仟捌佰玖拾元整
// 转义HTML字符方法
const htmlStr = htmlEscape('<span class="bt">bilibili</span>')
console.log(htmlStr) // <span class="bt">bilibili</span>
//定义还原HTML字符的方法
const text = htmlUnEscape('<span class="bt">bilibili</span>')
console.log(text) // <span class="bt">bilibili</span>
开源协议
ISC
1.0.0
2 years ago