forked from stipsan/ioredis-mock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Added ### ZRANGEBYSCORE command (stipsan#350 @usebaz) ```js const data = { foo: new Map([ ['first', { score: 1, value: 'first' }], ['second', { score: 2, value: 'second' }], ['third', { score: 3, value: 'third' }], ['fourth', { score: 4, value: 'fourth' }], ['fifth', { score: 5, value: 'fifth' }], ]), }; const RedisMock = require('ioredis-mock'); const redis = new MockRedis({ data }); redis .zrangebyscore('foo', 1, 3) .then(result => console.log(result)) // logs ['first', 'second', 'third'] ``` ### QUIT stub (stipsan#350 @usebaz) In `ioredis` this is the equivalent to calling `redis.disconnect`. `ioredis-mock` does not implement connection simulation functionality yet so for now it's just a stub. ```js redis.quit() // OK ``` ### UNSUBSCRIBE stub (stipsan#350 @usebaz) Our previous release added `subscribe` and joining the fray you can now pretend to be unsubscribing (just like the newsletters in your inbox!) ```js redis.unsubscribe() // OK ```
- Loading branch information
Showing
3 changed files
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters