@skipper-dev/essentials
Advanced tools
Comparing version 1.0.3 to 1.0.4
module.exports = { | ||
decodeBase64(input) { | ||
if (!input) throw new error('You need to specify a base64 string to decode.') | ||
try { | ||
input = input.toString() | ||
} catch (err) { | ||
throw new error('You have to provide a input type of string, int or boolean, recieved type ' + typeof(input)) | ||
} | ||
if (typeof(input) != 'string') throw new error('You have to provide a input type of string, int or boolean, recieved type ' + typeof(input)) | ||
try { | ||
var decoded = new Buffer(input, 'base64').toString('ascii') | ||
@@ -5,0 +13,0 @@ return decoded |
{ | ||
"name": "@skipper-dev/essentials", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A essentials module with every important feature the npm community features and some more. Basicially just a big chunk of utils", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
1545
24