utf8-to-chinese

0.0.1 • Public • Published

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

Package Sidebar

Install

npm i utf8-to-chinese

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

1.17 kB

Total Files

3

Last publish

Collaborators

  • brujie