redis-hash-js
This module provides RedisHash
, a class that adds some basic syntactic sugar around Redis hash commands like HMGET
, HMSET
, HINCRBY
, among others. Supported operations include:
- Bulk setting and getting
- Boolean flags
- Counters
Example
redis = ;RedisHash = ; hash = redis 'hashKey'; hash;hash; hash; hash;
Installation
npm install redis-hash
Class reference
constructor(redisClient, key, opts)
- opts
- emitErrs (true) Redis errors will be emitted as
error
events
- emitErrs (true) Redis errors will be emitted as