(b64)
| 2482 | revLookup['_'.charCodeAt(0)] = 63 |
| 2483 | |
| 2484 | function getLens (b64) { |
| 2485 | var len = b64.length |
| 2486 | |
| 2487 | if (len % 4 > 0) { |
| 2488 | throw new Error('Invalid string. Length must be a multiple of 4') |
| 2489 | } |
| 2490 | |
| 2491 | // Trim off extra bytes after placeholder bytes are found |
| 2492 | // See: https://github.com/beatgammit/base64-js/issues/42 |
| 2493 | var validLen = b64.indexOf('=') |
| 2494 | if (validLen === -1) validLen = len |
| 2495 | |
| 2496 | var placeHoldersLen = validLen === len |
| 2497 | ? 0 |
| 2498 | : 4 - (validLen % 4) |
| 2499 | |
| 2500 | return [validLen, placeHoldersLen] |
| 2501 | } |
| 2502 | |
| 2503 | // base64 is 4/3 + up to two characters of the original data |
| 2504 | function byteLength (b64) { |
no outgoing calls
no test coverage detected
searching dependent graphs…