Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: refresh documentation #4

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![CI](https://github.com/iuioiua/redis/actions/workflows/ci.yml/badge.svg)](https://github.com/iuioiua/redis/actions/workflows/ci.yml)

Lightning-fast, lightweight and reliable [Redis](https://redis.io/) client for
Bun, Cloudflare Workers, Deno and web browsers.
all major JavaScript runtimes.

```ts
import { RedisClient } from "@iuioiua/redis";
Expand Down Expand Up @@ -55,15 +55,19 @@ do rather than what it does do. It doesn't extend the functionality of a TCP
connection. It doesn't implement a method for each Redis command, of which there
are hundreds. Instead, the Redis client consumes a TCP connection, lets the user
write Redis commands, and returns the parsed result according to the RESP data
type. The result is a design with fewer moving parts, fewer bugs, less
maintenance, and a smaller footprint than other JavaScript implementations of
Redis clients.
type. It does this using the
[Streams API](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) to
be compatible with all the major JavaScript runtimes; [Bun](https://bun.sh/),
[Cloudflare Workers](https://workers.cloudflare.com/),
[Deno](https://deno.com/), [Node.js](https://nodejs.org/en) and web browsers.
The result is a design with fewer moving parts, fewer bugs, less maintenance,
and a smaller footprint than other JavaScript implementations of Redis clients.

| Module | Size (KB) | Dependencies |
| ------------------ | --------- | ------------ |
| jsr:@iuioiua/redis | 25.25 | 5 |
| jsr:@iuioiua/redis | 17.51 | 3 |
| jsr:@db/redis | 214.31 | 34 |
| npm:ioredis | 897.71 | 10 |
| npm:redis | 968.17 | 9 |
| npm:ioredis | 894.69 | 10 |
| npm:redis | 951.12 | 9 |

> Note: Results were produced using `deno info <module>` on February 16, 2025.
> Note: Results were produced using `deno info <module>` on March 9, 2025.
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function createRequest(command: Command): Uint8Array {
async function* readLines(
readable: ReadableStream<Uint8Array<ArrayBufferLike>>,
) {
let chunks: Uint8Array<ArrayBufferLike> = new Uint8Array(new ArrayBuffer(0));
let chunks: Uint8Array<ArrayBufferLike> = new Uint8Array();
for await (const chunk of readable) {
chunks = concat([chunks, chunk]) as Uint8Array<ArrayBufferLike>;
let index;
Expand Down