Blob
admin/discounts.internal.Blob
A Blob
encapsulates immutable, raw data that can be safely shared across
multiple worker threads.
Since
v15.7.0, v14.18.0
Properties
size
numberRequiredThe total size of the
Blob
in bytes. #### Since v15.7.0, v14.18.0type
stringRequiredThe content-type of the
Blob
. #### Since v15.7.0, v14.18.0Methods
arrayBuffer
arrayBuffer(): Promise
<ArrayBuffer
>
Returns a promise that fulfills with an ArrayBuffer containing a copy of
the Blob
data.
Returns
Promise
<ArrayBuffer
>
Promise
Promise<ArrayBuffer>RequiredSince
v15.7.0, v14.18.0
slice
slice(start?
, end?
, type?
): Blob
Creates and returns a new Blob
containing a subset of this Blob
objects
data. The original Blob
is not altered.
Parameters
start
numberThe starting index.
end
numberThe ending index.
type
stringThe content-type for the new
Blob
Returns
Since
v15.7.0, v14.18.0
stream
stream(): ReadableStream
<any
>
Returns a new ReadableStream
that allows the content of the Blob
to be read.
Returns
ReadableStream
<any
>
Since
v16.7.0
text
text(): Promise
<string
>
Returns a promise that fulfills with the contents of the Blob
decoded as a
UTF-8 string.
Returns
Promise
<string
>
Promise
Promise<string>Required
Promise
Promise<string>RequiredSince
v15.7.0, v14.18.0
Was this section helpful?