From 64a7384d04969ef5c55cfb327d363f8ddd4b6ab5 Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Fri, 6 Mar 2020 08:42:42 +0100 Subject: [PATCH] add readme --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..454018d --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Encoding Helper + +Converting strings between different encodings + +## Usage + +```js +const encoding = require('@scode/encoding-helper'); + +const hex = encoding.to_hex('abc'); // convert any encoding to hex, default is utf-8 +const b64 = encoding.to_b64(hex, 'hex'); // convert any encoding to base64, default is utf-8 +const utf8 = encoding.to_utf8(hex, 'hex'); // convert any encoding to utf-8, no default +```