redis-type 0.5.1 is a thin wrapper around Redis data structures (HASH, LIST, SET) that mirrors JavaScript's Map, Array, and Set APIs, returning native JS types instead of raw Redis replies. It provides Promise-based methods and optional JSON serialization. Unlike generic Redis clients, it offers a typed, idiomatic interface. The package is maintained but does not release frequently. It requires a user-provided Redis client (e.g., node-redis). Compatible with modern Node.js (>=14) and ESM/CommonJS dual packaging.
npm install redis-typeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a redis client, initializes a Hash wrapper with JSON serialization enabled, sets and gets an object.
Call .bind(client) immediately after importing: const { Hash } = require('redis-type').bind(client);Use the returned plain object directly or convert to Map manually: const map = new Map(Object.entries(obj));
Do not pass a second argument to List or Set; it is ignored.
Switch to: const { Hash } = require('redis-type').bind(client);Ensure you invoke .bind(client) and use the destructured constructors from its return.
Upgrade to node-redis v4+: npm install redis@latest
Check .set(field, value) signature for Hash: exactly two arguments after key.
No dependency data recorded yet.