Skip to content

Commit 60fc52b

Browse files
committed
remove unneeded function (#5296)
1 parent 50e58bd commit 60fc52b

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

src/base64Utils.js

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,6 @@
88

99
var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
1010

11-
var btoa = btoa || function (input) {
12-
/**
13-
* Encodes a string in base64
14-
* @param {String} input The string to encode in base64.
15-
*/
16-
var output = '';
17-
var chr1, chr2, chr3;
18-
var enc1, enc2, enc3, enc4;
19-
var i = 0;
20-
do {
21-
chr1 = input.charCodeAt(i++);
22-
chr2 = input.charCodeAt(i++);
23-
chr3 = input.charCodeAt(i++);
24-
25-
enc1 = chr1 >> 2;
26-
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
27-
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
28-
enc4 = chr3 & 63;
29-
30-
if (isNaN(chr2)) {
31-
enc2 = ((chr1 & 3) << 4);
32-
enc3 = enc4 = 64;
33-
} else if (isNaN(chr3)) {
34-
enc4 = 64;
35-
}
36-
output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4);
37-
} while (i < input.length);
38-
return output;
39-
};
40-
4111
var atob = atob || function (input) {
4212
/**
4313
* Decodes a base64 string.

0 commit comments

Comments
 (0)