Fixing whitespace conformity in base64.js

This commit is contained in:
Travis Weston
2014-07-13 12:26:36 -04:00
parent 216c51b44b
commit 42ed1cea1f
+14 -14
View File
@@ -6,11 +6,11 @@
**/ **/
var Base64 = { var Base64 = {
// private property // private property
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
// public method for encoding // public method for encoding
encode : function (input) { encode : function (input) {
var output = ""; var output = "";
var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0; var i = 0;
@@ -41,10 +41,10 @@ encode : function (input) {
} }
return output; return output;
}, },
// public method for decoding // public method for decoding
decode : function (input) { decode : function (input) {
var output = ""; var output = "";
var chr1, chr2, chr3; var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4; var enc1, enc2, enc3, enc4;
@@ -78,10 +78,10 @@ decode : function (input) {
return output; return output;
}, },
// private method for UTF-8 encoding // private method for UTF-8 encoding
_utf8_encode : function (string) { _utf8_encode : function (string) {
string = string.replace(/\r\n/g,"\n"); string = string.replace(/\r\n/g,"\n");
var utftext = ""; var utftext = "";
@@ -105,10 +105,10 @@ _utf8_encode : function (string) {
} }
return utftext; return utftext;
}, },
// private method for UTF-8 decoding // private method for UTF-8 decoding
_utf8_decode : function (utftext) { _utf8_decode : function (utftext) {
var string = ""; var string = "";
var i = 0; var i = 0;
var c = c1 = c2 = 0; var c = c1 = c2 = 0;
@@ -136,6 +136,6 @@ _utf8_decode : function (utftext) {
} }
return string; return string;
} }
} }