utf8-helper
v1.4.0
Published
A library helps you get UTF8 string.
Downloads
1
Readme
utf8-helper
A library helps you get UTF8 string.
Install
npm i utf8-helper
Usage
const utf8Helper = require("utf8-helper");
const encodedStr = utf8Helper.encode("Hello World!"); //\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x21
// with prefix
const encodedStr = utf8Helper.encode("Hello World!", "\\u"); //\u48\u65\u6C\u6C\u6F\u20\u57\u6F\u72\u6C\u64\u21