UNPKG

@gensx/storage

Version:

Cloud storage, blobs, sqlite, and vector database providers/hooks for GenSX.

17 lines (15 loc) 453 B
import { BlobClient } from "./blobClient.js"; import { BlobStorageOptions } from "./types.js"; /** * Hook to access a blob * @param key The name of the blob to access * @param options Optional configuration properties for the blob * @returns A blob object for the given key */ export function useBlob<T = unknown>( key: string, options: BlobStorageOptions = {}, ) { const client = new BlobClient(options); return client.getBlob<T>(key); }