function createMemory
createMemory(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 = createMemory({ prefix: "files/" });
const storage = await connector.connect();
await storage.put("test.txt", "Hello");

Parameters

optional
options: StorageOptions

Return Type

Usage

import { createMemory } from ".";