Skip to content

extractBlobPreview()

@blobs/sdk v0.1.0


@blobs/sdk / utils/blobUtils / extractBlobPreview

extractBlobPreview(blob, maxLength?): string

Defined in: utils/blobUtils.ts:369

Extract a short preview from a blob’s content.

Parameters

blob

Blob

Blob to preview.

maxLength?

number = 150

Maximum preview length (default 150).

Returns

string

A truncated preview, or empty string if the blob has no content.