# Class Blob

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

#### Since

v15.7.0, v14.18.0

- Defined in node_modules/@types/node/buffer.d.ts:142

#####
Index

### Constructors

constructor

### Properties

size
type

### Methods

arrayBuffer
slice
text
stream

##
Constructors

### constructor

- new Blob(sources, options?): Blob

- 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`.

  #### Parameters

  - sources: (ArrayBuffer | Blob | BinaryLike)[]
  - `Optional` options: BlobOptions

  #### Returns Blob

  - Defined in node_modules/@types/node/buffer.d.ts:161

##
Properties

### `Readonly` size

size: number

The total size of the `Blob` in bytes.

#### Since

v15.7.0, v14.18.0

- Defined in node_modules/@types/node/buffer.d.ts:147

### `Readonly` type

type: string

The content-type of the `Blob`.

#### Since

v15.7.0, v14.18.0

- Defined in node_modules/@types/node/buffer.d.ts:152

##
Methods

### arrayBuffer

- arrayBuffer(): Promise<ArrayBuffer>

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

  #### Returns Promise<ArrayBuffer>

  #### Since

  v15.7.0, v14.18.0

  - Defined in node_modules/@types/node/buffer.d.ts:167

### 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

  - `Optional` start: number

    The starting index.

  - `Optional` end: number

    The ending index.

  - `Optional` type: string

    The content-type for the new `Blob`

  #### Returns Blob

  #### Since

  v15.7.0, v14.18.0

  - Defined in node_modules/@types/node/buffer.d.ts:176

### text

- text(): Promise<string>

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

  #### Returns Promise<string>

  #### Since

  v15.7.0, v14.18.0

  - Defined in node_modules/@types/node/buffer.d.ts:182

### 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

  - Defined in node_modules/@types/node/buffer.d.ts:187