-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathbase64.d.ts
More file actions
21 lines (19 loc) · 646 Bytes
/
base64.d.ts
File metadata and controls
21 lines (19 loc) · 646 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
* Create a Base64-encoded ASCII string from a binary string.
* @NOTE Alias for the `btoa` built-in.
* @param {string} value
*/
export function encode(value: string): string;
/**
* Decode a string from a Base64-encoded value.
* @NOTE Alias for the `atob` built-in.
* @param {string} value
*/
export function decode(value: string): string;
/**
* Create a Base64-encoded ASCII string that's safe for use within URL applications.
* @NOTE This may often be referred to as "base64url" encoding.
* @see https://en.wikipedia.org/wiki/Base64#URL_applications
* @param {string} value
*/
export function base64url(value: string): string;