참고: 이 페이지는 아직 한국어로 번역되지 않았습니다. 아래는 영어 원문입니다.
data as a base-64 encoded string.
Parameters
Returns
string
The base-64 encoded string.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
참고: 이 페이지는 아직 한국어로 번역되지 않았습니다. 아래는 영어 원문입니다.
function encodeBase64(data): string
data as a base-64 encoded string.
| Parameter | Type | Description |
|---|---|---|
data | BytesLike | The data to encode. |
string
The base-64 encoded string.
// Encoding binary data as a hexstring
encodeBase64('0x1234');
// Encoding binary data as a Uint8Array
encodeBase64(new Uint8Array([0x12, 0x34]));
// The input MUST be data...
encodeBase64('Hello World!!');
// ...use toUtf8Bytes for this.
encodeBase64(toUtf8Bytes('Hello World!!'));
