Skip to main content
Go to Latest
function blobConvert
import { blobConvert } from "https://deno.land/x/simple_utility@v1.4.1/mod.universal.ts";

Convert from blob to specified data type.

Examples

Example 1

const file = new File(["my-text"], "example.txt");
const data = await blobConvert(file, "text");

Type Parameters

T extends keyof BlobType

Parameters

blob: Blob
type: T

Returns

Promise<BlobType[T]>