Registry / database / comb-redis

comb-redis

JSON →
library2.0.0jsnpmunverified

A small, promise-based Redis client for Node.js, version 2.0.0. Built on top of node_redis, it provides a comb promise-based interface for all Redis commands with automatic pipelining. It is a fork of then-redis and requires the comb framework to be declared elsewhere. The library is stable and safe, supporting Redis 2.6+. It offers variable-length argument lists and direct send() method.

npm install comb-redis
INSTALL
IMPORT
SIG · COMB-REDIS
C
comb-redis
databasejavascriptv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

createClient
const redis = require('comb-redis'); const db = redis.createClient();
import { createClient } from 'comb-redis';
Package is CJS-only; ESM import not supported.
Client
const { Client } = require('comb-redis');
import { Client } from 'comb-redis';
Client is exported as a named export from CJS.
default import
const redis = require('comb-redis');
import redis from 'comb-redis';
No default ESM export; use require.

Create a Redis client, set a key, increment it, and retrieve the value using promises.

const redis = require('comb-redis'); const db = redis.createClient(); db.set('my-key', 1); db.incrby('my-key', 5); db.get('my-key').then(value => { console.log(value); // 6 });
Debug
Known issues
gotchaThis module assumes that comb has been declared elsewhere in your project, otherwise conflicts will occur.
fix
Ensure the comb library is loaded before using comb-redis.
affects: all
deprecatedThe package is a fork of then-redis and may not receive updates.
fix
Consider using ioredis or redis for active support.
affects: >=0.0.0
Errors
Common errors & fixes
Error: comb is not defined
The comb library is not loaded before comb-redis is required.
fix
Require comb before comb-redis: require('comb'); const redis = require('comb-redis');
TypeError: db.set(...).then is not a function
Using require in CommonJS but expecting a promise that doesn't exist (e.g., forgetting the .then).
fix
Ensure you chain .then() on the promise returned by db.set().
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
OpenAI (training)
1
Resources
comb-redis — npm install comb-redis · libregistry