@swaggerexpert/cookie
Version:
RFC 6265 compliant cookie parser, validator and serializer.
10 lines (9 loc) • 318 B
JavaScript
;
exports.__esModule = true;
exports.default = void 0;
const base64Encoder = input => {
const bytes = new TextEncoder().encode(input);
const binaryString = bytes.reduce((acc, byte) => acc + String.fromCharCode(byte), '');
return btoa(binaryString);
};
var _default = exports.default = base64Encoder;