@miniflare/storage-memory

In-memory storage module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers

Usage no npm install needed!

<script type="module">
  import miniflareStorageMemory from 'https://cdn.skypack.dev/@miniflare/storage-memory';
</script>

README

@miniflare/storage-memory

In-memory storage module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers.

Example

import { KVNamespace } from "@miniflare/kv";
import { MemoryStorage } from "@miniflare/storage-memory";

const ns = new KVNamespace(new MemoryStorage());
await ns.put("key", "value");
console.log(await ns.get("key")); // value