ts-safe-redis-leader

JSON →
library 0.0.5 ·javascript
verified Jun 7, 2026

A TypeScript library for distributed Redis leader election with race-condition-free guarantees. Version 0.0.5 is the latest stable release; the project appears to be a fork of safe-redis-leader with TypeScript support, new events (elected/notElected), and tests verifying single-leader-at-a-time. Key differentiators include async/await API, removal of race conditions from the original redis-leader package, and Jest-based testing against a real Redis instance via Docker Compose. The library is small, focused, and suitable for Node.js applications needing reliable leader election without external dependencies beyond ioredis.