diff --git a/index.js b/index.js index bdb09a0..c2537a1 100644 --- a/index.js +++ b/index.js @@ -1,11 +1,6 @@ 'use strict' -module.exports = { - unescape, - escape, - encode, - decode -} + function unescape (str) { return (str + '==='.slice((str.length + 3) % 4)) @@ -26,3 +21,10 @@ function encode (str, encoding) { function decode (str, encoding) { return Buffer.from(unescape(str), 'base64').toString(encoding || 'utf8') } + +module.exports = { + unescape:unescape, + escape:escape, + encode:encode, + decode:decode +}