deepbase-redis 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +9 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -150,6 +150,15 @@ class DeepBaseRedis {
150
150
  await this.set(...[...keys, id, value])
151
151
  return [...keys, id]
152
152
  }
153
+
154
+ use(plugin) {
155
+ const prototype = Object.getPrototypeOf(plugin);
156
+ Object.getOwnPropertyNames(prototype).forEach(method => {
157
+ if (method !== 'constructor') {
158
+ this[method] = plugin[method].bind(this);
159
+ }
160
+ });
161
+ }
153
162
  }
154
163
 
155
164
  module.exports = DeepBaseRedis;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepbase-redis",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "⚡ Fastest and simplest way to add Redis Stack persistence to your projects.",
5
5
  "main": "index.js",
6
6
  "dependencies": {