Namespace: blob
Interfaces
Functions
blobToArrayBuffer
▸ blobToArrayBuffer(blob
): Promise
<ArrayBuffer
>
Asynchronously reads blob data into an ArrayBuffer
.
Parameters
Name | Type | Description |
---|---|---|
blob |
Blob |
The blob to read |
Returns
Promise
<ArrayBuffer
>
blobToDataUrl
▸ blobToDataUrl(blob
): Promise
<string
>
Asynchronously reads blob data into a data URL.
Parameters
Name | Type | Description |
---|---|---|
blob |
Blob |
The blob to read |
Returns
Promise
<string
>
blobToText
▸ blobToText(blob
, encoding?
): Promise
<string
>
Asynchronously reads blob data into a string
.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
blob |
Blob |
undefined |
The blob to read |
encoding |
string |
'utf-8' |
Encoding to use, defaults to utf-8 |
Returns
Promise
<string
>
decodeBlob
▸ decodeBlob(blob
): Promise
<BlobFile
[]>
Asynchronously decodes a blob and splits the contents into an array of BlobFile
interfaces.
Parameters
Name | Type | Description |
---|---|---|
blob |
Blob |
The blob to decode |
Returns
Promise
<BlobFile
[]>