Closed balupton closed 9 years ago
In order to better support this project and its new group of collaborators under a new org we are trying to clean up and close issues older than 6 months. Your issue may have been fixed since the issue was open, however, if you are still experiencing a problem please re-open this issue and we will label it accordingly.
@balupton It is easy to implement this by your own in the way you want it to. That is likely the best to do here, as we'd also have to bind multi statements and batch commands that will be added at some point. And the later two would have a new instance each time you call them, so it'd be a performance overhead to bind the functions in that case.
So instead of adding this to the core, you can just do the same right after instantiating the client / multi.
It would be nice for the constructor of the redis client, to bind it's method to the instance, so I can throw around the methods using functional programming paradigms, without having to bind them myself. E.g. this is some code I recently wrote using ChainyJS and FeathersJS:
Would be great if I could get rid of that
.bind(config.r)
The following code added to the constructor of the client should do the trick: