UNPKG

@hazae41/base64

Version:

Base64 adapter for JS implementations

22 lines (19 loc) 514 B
'use strict'; function fromNative() { return { encodePaddedOrThrow(bytes) { return bytes.toBase64(); }, decodePaddedOrThrow(text) { return Uint8Array.fromBase64(text); }, encodeUnpaddedOrThrow(bytes) { return bytes.toBase64({ omitPadding: true }); }, decodeUnpaddedOrThrow(text) { return Uint8Array.fromBase64(text); } }; } exports.fromNative = fromNative; //# sourceMappingURL=index.cjs.map