Projects STRLCPY link-lock Commits c4a4199f
🤬
  • ■ ■ ■ ■ ■ ■
    b64.js
    skipped 6 lines
    7 7   
    8 8   // Generate a dictionary with {key: val} as {character: index in input string}
    9 9   function generateIndexDict(a) {
    10  - let result = {}
     10 + let result = {};
    11 11   for (let i = 0; i < a.length; i++) {
    12 12   result[a[i]] = i;
    13 13   }
    skipped 43 lines
    57 57   let bytes = new Uint8Array(length + added);
    58 58   bytes.set(originalBytes);
    59 59   
    60  - let output = ""
     60 + let output = "";
    61 61   for (let i = 0; i < bytes.length; i += 3) {
    62 62   // Convert 3 8-bit bytes into 4 6-bit indices and get a character from
    63 63   // the master list based on each 6-bit index
    skipped 23 lines
    87 87   // an error if the input string does not appear to be a valid base64
    88 88   // encoding. Attempts to add padding to un-padded base64 strings.
    89 89   base64ToBinary: function(s) {
    90  - let bytes = []
     90 + let bytes = [];
    91 91   
    92 92   // Base64 strings have at most 2 padding characters to make their length
    93 93   // a multiple of 4, so they could be missing up to 2 characters and still
    skipped 44 lines
Please wait...
Page is in error, reload to recover