Files
medusa-store/www/apps/docs/content/references/js-client/classes/internal-8.Blob.md
github-actions[bot] daea35fe73 chore(docs): Generated JS Client Reference (#5334)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2023-10-10 17:47:07 +00:00

2.3 KiB

displayed_sidebar
displayed_sidebar
jsClientSidebar

Class: Blob

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

Readonly size: number

The total size of the Blob in bytes.

Since

v15.7.0, v14.18.0

Defined in

packages/medusa-js/node_modules/@types/node/buffer.d.ts:142


type

Readonly type: string

The content-type of the Blob.

Since

v15.7.0, v14.18.0

Defined in

packages/medusa-js/node_modules/@types/node/buffer.d.ts:147

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

packages/medusa-js/node_modules/@types/node/buffer.d.ts:162


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

Name Type Description
start? number The starting index.
end? number The ending index.
type? string The content-type for the new Blob

Returns

Blob

Since

v15.7.0, v14.18.0

Defined in

packages/medusa-js/node_modules/@types/node/buffer.d.ts:171


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

packages/medusa-js/node_modules/@types/node/buffer.d.ts:182


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

packages/medusa-js/node_modules/@types/node/buffer.d.ts:177