function createInMemory
createInMemory(options?: StorageOptions): StorageConnector

Creates an in-memory storage connector for testing. Data is stored in memory and lost when the process ends.

Examples

Example 1

const connector = createInMemory({ prefix: "files/" });
const storage = await connector.connect();
await storage.put("test.txt", "Hello");

Parameters

optional
options: StorageOptions

Return Type

Usage

import { createInMemory } from ".";