(b64)
| 114097 | revLookup["-".charCodeAt(0)] = 62; |
| 114098 | revLookup["_".charCodeAt(0)] = 63; |
| 114099 | function getLens(b64) { |
| 114100 | var len1 = b64.length; |
| 114101 | if (len1 % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4"); |
| 114102 | // Trim off extra bytes after placeholder bytes are found |
| 114103 | // See: https://github.com/beatgammit/base64-js/issues/42 |
| 114104 | var validLen = b64.indexOf("="); |
| 114105 | if (validLen === -1) validLen = len1; |
| 114106 | var placeHoldersLen = validLen === len1 ? 0 : 4 - validLen % 4; |
| 114107 | return [ |
| 114108 | validLen, |
| 114109 | placeHoldersLen |
| 114110 | ]; |
| 114111 | } |
| 114112 | // base64 is 4/3 + up to two characters of the original data |
| 114113 | function byteLength(b64) { |
| 114114 | var lens = getLens(b64); |
no outgoing calls
no test coverage detected