Skip to content

Blob

Defined in: node_modules/.pnpm/@types+node@24.6.2/node_modules/@types/node/buffer.d.ts:146

A Blob encapsulates immutable, raw data that can be safely shared across multiple worker threads.

v15.7.0, v14.18.0

new Blob(sources, options?): Blob;

Defined in: node_modules/.pnpm/@types+node@24.6.2/node_modules/@types/node/buffer.d.ts:165

Creates a new Blob object containing a concatenation of the given sources.

{ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into the ‘Blob’ and can therefore be safely modified after the ‘Blob’ is created.

String sources are also copied into the Blob.

ParameterType
sources( | ArrayBuffer | Blob | BinaryLike)[]
options?BlobOptions

Blob

readonly size: number;

Defined in: node_modules/.pnpm/@types+node@24.6.2/node_modules/@types/node/buffer.d.ts:151

The total size of the Blob in bytes.

v15.7.0, v14.18.0


readonly type: string;

Defined in: node_modules/.pnpm/@types+node@24.6.2/node_modules/@types/node/buffer.d.ts:156

The content-type of the Blob.

v15.7.0, v14.18.0

arrayBuffer(): Promise<ArrayBuffer>;

Defined in: node_modules/.pnpm/@types+node@24.6.2/node_modules/@types/node/buffer.d.ts:171

Returns a promise that fulfills with an ArrayBuffer containing a copy of the Blob data.

Promise<ArrayBuffer>

v15.7.0, v14.18.0


bytes(): Promise<Uint8Array<ArrayBufferLike>>;

Defined in: node_modules/.pnpm/@types+node@24.6.2/node_modules/@types/node/buffer.d.ts:182

The blob.bytes() method returns the byte of the Blob object as a Promise<Uint8Array>.

const blob = new Blob(['hello']);
blob.bytes().then((bytes) => {
console.log(bytes); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ]
});

Promise<Uint8Array<ArrayBufferLike>>


slice(
start?,
end?,
type?): Blob;

Defined in: node_modules/.pnpm/@types+node@24.6.2/node_modules/@types/node/buffer.d.ts:191

Creates and returns a new Blob containing a subset of this Blob objects data. The original Blob is not altered.

ParameterTypeDescription
start?numberThe starting index.
end?numberThe ending index.
type?stringThe content-type for the new Blob

Blob

v15.7.0, v14.18.0


stream(): ReadableStream;

Defined in: node_modules/.pnpm/@types+node@24.6.2/node_modules/@types/node/buffer.d.ts:202

Returns a new ReadableStream that allows the content of the Blob to be read.

ReadableStream

v16.7.0


text(): Promise<string>;

Defined in: node_modules/.pnpm/@types+node@24.6.2/node_modules/@types/node/buffer.d.ts:197

Returns a promise that fulfills with the contents of the Blob decoded as a UTF-8 string.

Promise<string>

v15.7.0, v14.18.0