@geacko/resp3-parser@6.0.4Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
Geacko/resp3-parserRESPv2/3 Parser
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
100%
Published
a year ago (6.0.4)
resp3-parser
Parser for RESP protocol v2/v3
Basic Example
const parser = new Resp3Parser() const blob = new TextEncoder().encode('+This is a test...\r\n#t\r\n:1234567890\r\n') parser.appendChunk(blob.subarray(0,9)) parser.appendChunk(blob.subarray(9)) while (parser.remainingBytes > 0) { console.log(parser.process()) } // Outputs: // This is a test... // true // 1234567890
RESP3 Features
Feature | Supported |
---|---|
Attributes | Yes |
Streamed strings | Yes |
Streamed aggregated data types | Yes |
Sets | Yes |
Maps | Yes |
Verbatim Strings | Yes |
Blob Errors | Yes |
Pushes | Yes |
Big Numbers | Yes |
Booleans | Yes |
Doubles | Yes |
Null | Yes |
Hello | Yes |
Types
RESP | Javascript |
---|---|
Simple String | string |
Simple Error | Failure |
Integer | number or bigint |
Big Number | bigint |
Boolean | boolean |
Double | number |
Array | Array |
Null | null |
Bulk String | Bulk or string |
Verbatim String | FormatedBulk |
Bulk Error | Failure |
Set | Unordered |
Map | Hash |
Attributes | Hash |
Hello | Hash |
Push | Push |
Reply with Attributes | { reply: unknown, attributes: Hash } |
Built and signed on
GitHub Actions
Add Package
deno add jsr:@geacko/resp3-parser
Import symbol
import * as resp__parser from "@geacko/resp3-parser";
Import directly with a jsr specifier
import * as resp__parser from "jsr:@geacko/resp3-parser";
Add Package
pnpm i jsr:@geacko/resp3-parser
pnpm dlx jsr add @geacko/resp3-parser
Import symbol
import * as resp__parser from "@geacko/resp3-parser";
Add Package
yarn add jsr:@geacko/resp3-parser
yarn dlx jsr add @geacko/resp3-parser
Import symbol
import * as resp__parser from "@geacko/resp3-parser";
Add Package
npx jsr add @geacko/resp3-parser
Import symbol
import * as resp__parser from "@geacko/resp3-parser";
Add Package
bunx jsr add @geacko/resp3-parser
Import symbol
import * as resp__parser from "@geacko/resp3-parser";