Registry / devops / dipswitch-redis

dipswitch-redis

JSON →
library1.0.1jsnpmunverified

This package provides a Redis-backed store for the dipswitch feature flag library, version 1.0.1. It acts as an adapter that passes a Redis client to dipswitch, enabling persistent and distributed feature flag storage. Current release cadence: stable (no recent updates). Differentiator: lightweight integration with dipswitch using standard Redis client.

npm install dipswitch-redis
INSTALL
IMPORT
SIG · DIPSWITCH-REDIS
D
dipswitch-redis
devopsjavascriptv1.0.1
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.

default
const store = require('dipswitch-redis')(redisClient)
const store = require('dipswitch-redis'); store(redisClient) // wrong: missing factory invocation
package exports a factory function that takes a Redis client and returns a dipswitch-compatible store object

Shows how to create a Redis client, obtain a dipswitch store, and initialize dipswitch with it.

const redis = require('redis'); const redisClient = redis.createClient(); const dipswitchStore = require('dipswitch-redis')(redisClient); const Dipswitch = require('dipswitch'); const dipswitch = new Dipswitch({ store: dipswitchStore }); dipswitch.enable('my-feature'); console.log(dipswitch.enabled('my-feature')); // true
Debug
Known issues
gotchaThe redis client must be created and passed as an argument; the store does not manage connection lifecycle.
fix
Ensure you call redis.createClient() and handle errors/reconnection appropriately.
affects: >=0.0.0
deprecatedThe package is not actively maintained; last release was 9 years ago.
fix
Consider migrating to a more modern feature flag store or forking.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: dipswitchStore is not a function
Requiring the module without calling it as a factory
fix
Use `const store = require('dipswitch-redis')(redisClient)` not `const store = require('dipswitch-redis')`
Error: Redis connection to 127.0.0.1:6379 failed
Redis server not running or accessible
fix
Start Redis server or check redisClient configuration
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
dipswitchrequiredpeer dependency; this store is designed to be used exclusively with dipswitch
redisrequiredruntime dependency; the Redis client used to connect to Redis
Agent activity
7 hits · last 30 days
node
6
Resources
dipswitch-redis — npm install dipswitch-redis · libregistry