We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f71fa25 commit 481cae9Copy full SHA for 481cae9
src/utils/base64.js
@@ -11,9 +11,9 @@
11
export type Base64String = string;
12
13
export function base64(i: string): Base64String {
14
- return new Buffer(i, 'utf8').toString('base64');
+ return Buffer.from(i, 'utf8').toString('base64');
15
}
16
17
export function unbase64(i: Base64String): string {
18
- return new Buffer(i, 'base64').toString('utf8');
+ return Buffer.from(i, 'base64').toString('utf8');
19
0 commit comments