Files
rxminder/utils/base64.ts
2025-09-23 11:27:32 -07:00

8 lines
183 B
TypeScript

export const encodeBase64 = (value: string): string => {
if (typeof btoa !== 'undefined') {
return btoa(value);
}
return Buffer.from(value, 'utf-8').toString('base64');
};