nx.js
Classes

Blob

A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format.

Extended by

Implements

Constructors

new Blob()

new Blob(blobParts, options): Blob

Parameters

ParameterTypeDefault valueDescription
blobPartsBlobPart[][]An array of BlobPart values that will be concatenated into a single Blob.
optionsBlobPropertyBag{}An optional object that specifies the Content-Type and endings of the Blob.

Returns

Blob

Accessors

size

get size(): number

Returns the size of the Blob object, in bytes.

Returns

number

Implementation of

globalThis.Blob.size


type

get type(): string

Returns the MIME type of the Blob object.

Returns

string

Implementation of

globalThis.Blob.type

Methods

arrayBuffer()

arrayBuffer(): Promise<ArrayBuffer>

Returns a promise that resolves with an ArrayBuffer representing the Blob's data.

Returns

Promise<ArrayBuffer>

Implementation of

globalThis.Blob.arrayBuffer


slice()

slice(start, end, type): Blob

Returns a new Blob object containing the data in the specified range of bytes of the source Blob.

Parameters

ParameterTypeDefault valueDescription
startnumber0The start byte index.
endnumber...The end byte index.
typestring''The content type of the new Blob.

Returns

Blob

Implementation of

globalThis.Blob.slice


stream()

Returns a stream that can be used to read the contents of the Blob.

Returns

ReadableStream<Uint8Array>

Implementation of

globalThis.Blob.stream


text()

text(): Promise<string>

Returns a promise that resolves with a string representation of the Blob object.

Returns

Promise<string>

Implementation of

globalThis.Blob.text

On this page