deepbase-redis 1.0.16 → 1.0.20

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.
package/README.md CHANGED
@@ -60,7 +60,11 @@ await mem.add("user", { name: "anya" });
60
60
  const userIds = await mem.keys("user")
61
61
  console.log(userIds) // [ 'CqtOILTDUg', 'MXOlTBSmEf' ]
62
62
 
63
- console.log(await mem.get())
63
+ const result = {
64
+ config: await mem.get('config'),
65
+ user: await mem.get('user'),
66
+ }
67
+ console.log(result)
64
68
  // {
65
69
  // config: { lang: 'EN' },
66
70
  // user: {
package/demo/demo.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import DeepBase from "../index.mjs";
1
+ import DeepBase from "../index.js";
2
2
 
3
3
  const mem = new DeepBase({ name: "demo" });
4
4
 
@@ -1,7 +1,7 @@
1
- import { createClient } from 'redis';
2
- import { customAlphabet } from 'nanoid'
1
+ const { createClient } = require('redis');
2
+ const { customAlphabet } = require('nanoid');
3
3
 
4
- export default class DeepBaseRedis {
4
+ class DeepBaseRedis {
5
5
 
6
6
  constructor(opts = {}) {
7
7
  this.nidAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
@@ -115,4 +115,6 @@ export default class DeepBaseRedis {
115
115
  await this.set(...[...keys, id, value])
116
116
  return [...keys, id]
117
117
  }
118
- }
118
+ }
119
+
120
+ module.exports = DeepBaseRedis;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "deepbase-redis",
3
- "version": "1.0.16",
3
+ "version": "1.0.20",
4
4
  "description": "⚡ Fastest and simplest way to add Redis Stack persistence to your projects.",
5
- "main": "index.mjs",
5
+ "main": "index.js",
6
6
  "dependencies": {
7
- "nanoid": "^5.0.4",
7
+ "nanoid": "^3.3.4",
8
8
  "redis": "^4.6.12"
9
9
  },
10
10
  "scripts": {
package/test/test.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /* eslint-env mocha */
2
2
 
3
- import DeepBase from '../index.mjs';
3
+ import DeepBase from '../index.js';
4
4
  import assert from 'assert';
5
5
 
6
6
  describe('DeepBaseRedis', () => {