@miniflare/r2
v2.14.4
Published
Workers R2 module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers
Downloads
351,436
Maintainers
Readme
@miniflare/r2
Workers R2 module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers. See 🪣 R2 for more details.
Example
import { R2Bucket } from "@miniflare/r2";
import { MemoryStorage } from "@miniflare/storage-memory";
const r2 = new R2Bucket(new MemoryStorage());
await r2.put("key", "value");
const value = await r2.get("key");
console.log(await value.text()); // "value"