@d1testflare/r2
v2.9.0
Published
Workers R2 module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers
Downloads
80
Maintainers
Readme
@d1testflare/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 "@d1testflare/r2";
import { MemoryStorage } from "@d1testflare/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"