0.0.1 • Published 3 years ago

utf8-to-chinese v0.0.1

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

utf8-to-chinese

Utf8 and Chinese translation tool

utf8与中文互转工具

安装

npm install utf8-to-chinese

使用

const {ConvUtf,ResChinese} = require("utf8-to-chinese")

let utf = '&#x611F&#x53D7&#x4E16&#x754C&#x7684&#x6E29&#x5EA6';
let str = '中国';

console.log(ResChinese(utf));
// 感受世界的温度

console.log(ConvUtf(str));
// %u4E2D%u56FD