A Redis client extension for Node.js and browser environments, supporting Redis commands, pub/sub, clustering, and TypeScript types. Current stable version is 2.0.4, with regular updates. It wraps the popular `redis` package and adds features like retry logic, connection pooling, and a simplified API. Key differentiators: promise-based, cluster support, and built-in TypeScript definitions.
npm install redis-extensionNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a Redis client, connect, set/get a key, and disconnect using redis-extension with async/await.
Migrate callback code to async/await. Remove .then() or .catch() chains.
Use import { RedisClient } from 'redis-extension'; for ESM or dynamic import for CommonJS.Replace createRedisClient with createClient.
Check if using cluster: import { RedisClusterClient } from 'redis-extension' and instantiate accordingly.Always specify port in URL, e.g., `redis://localhost:6379`.
Ensure you reconnect: call client.connect() before any commands. Check retry logic configuration.
Switch to import syntax: import { RedisClient } from 'redis-extension'; or use dynamic import() for CommonJS.