@skipper-dev/essentials
Advanced tools
Comparing version 1.0.6 to 1.0.7
15
main.js
module.exports = { | ||
encodeBase64(input) { | ||
if (!input) return Error('You need to specify a string to decode.') | ||
try { | ||
input = input.toString() | ||
} catch (err) { | ||
return Error('You have to provide a input type of string, int or boolean, recieved type ' + typeof(input)) | ||
} | ||
decodeBase64(input) { | ||
if (!input) return Error('You need to specify a base64 string to decode.') | ||
if (typeof(input) != 'string') return Error('You have to provide a input type of string, int or boolean, recieved type ' + typeof(input)) | ||
if (typeof (input) != 'string') return Error('You have to provide a input type of string, recieved type ' + typeof (input)) | ||
try { | ||
@@ -18,4 +13,4 @@ var decoded = new Buffer(input, 'base64').toString('ascii') | ||
}, | ||
decodeBase64(input) { | ||
if (!input) return Error('You need to specify a base64 string to decode.') | ||
encodeBase64(input) { | ||
if (!input) return Error('You need to specify a string to encode.') | ||
if (typeof (input) != 'string') return Error('You have to provide a input type of string, recieved type ' + typeof(input)) | ||
@@ -22,0 +17,0 @@ try { |
{ | ||
"name": "@skipper-dev/essentials", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"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", |
1516
21