Module

Node.Buffer.Blob

Package
purescript-node-buffer-blob
Repository
purescript-node/purescript-node-buffer-blob

#Blob Source

data Blob

#BlobEnding Source

#BlobOptions Source

type BlobOptions = { endings :: BlobEnding, type :: MediaType }

#fromArrayBuffers Source

fromArrayBuffers :: NonEmptyArray ArrayBuffer -> Maybe BlobOptions -> Blob

Creates a new Blob from one ore more ArrayBuffers

#fromBlobs Source

fromBlobs :: NonEmptyArray Blob -> Maybe BlobOptions -> Blob

Creates a new Blob from one ore more Blobs

#fromDataView Source

fromDataView :: NonEmptyArray DataView -> Maybe BlobOptions -> Blob

Creates a new Blob from one ore more DataViews

#fromStrings Source

fromStrings :: NonEmptyArray String -> Maybe BlobOptions -> Blob

Creates a new Blob from one or more strings

#size Source

size :: Blob -> Int

Returns the size of the blob.

#slice Source

slice :: Offset -> Offset -> Blob -> Blob

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

#stream Source

stream :: Blob -> Effect (ReadableStream Uint8Array)

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

#text Source

text :: Blob -> Effect (Promise String)

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

#toArrayBuffer Source

toArrayBuffer :: Blob -> Effect (Promise ArrayBuffer)

Copies the data in the Blob to a new JS ArrayBuffer

#tpe Source

tpe :: Blob -> String

Returns the content type of the blob