@miniflare/r2
TypeScript icon, indicating that this package has built-in type declarations

2.14.2 • Public • Published

@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"

Package Sidebar

Install

npm i @miniflare/r2

Weekly Downloads

106,272

Version

2.14.2

License

MIT

Unpacked Size

73 kB

Total Files

5

Last publish

Collaborators

  • wrangler-publisher