Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 | 1x 1x 1x 58x 1x 1x 100x | import {bufferToUint8Array} from './util/buffers/bufferToUint8Array';
import {hasBuffer} from './constants';
import {createFromBase64} from './createFromBase64';
const fromBase64Cpp = hasBuffer ? (encoded: string) => bufferToUint8Array(Buffer.from(encoded, 'base64')) : null;
const fromBase64Native = createFromBase64();
export const fromBase64 = !fromBase64Cpp
? fromBase64Native
: (encoded: string): Uint8Array => (encoded.length > 48 ? fromBase64Cpp(encoded) : fromBase64Native(encoded));
|