Home

Awesome

r2d2

JSR CI codecov

Minimal Redis client for Deno.

import { RedisClient } from "@iuioiua/r2d2";
import { assertEquals } from "@std/assert/equals";

using redisConn = await Deno.connect({ port: 6379 });
const redisClient = new RedisClient(redisConn);

const reply1 = await redisClient.sendCommand(["SET", "hello", "world"]);
assertEquals(reply1, "OK");

const reply2 = await redisClient.sendCommand(["GET", "hello"]);
assertEquals(reply2, "world");

Features

Usage

See documentation for usage instructions.

Contributing

Before submitting a pull request, please run deno task ok:dev. This task checks formatting, runs the linter and runs tests.

Note: Redis must be installed on your local machine. For installation instructions, see here.

Size comparison

ModuleSize (KB)Dependencies
r2d225.044
deno-redis213.1933
npm:ioredis895.3810
npm:redis968.179

Recorded on December 20, 2024.

Note: Results were produced using deno info <module>