polystore 0.9.0 → 0.9.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.
package/assets/home.html CHANGED
@@ -150,7 +150,7 @@ const value = await store.get("key1");
150
150
  <p>
151
151
  At
152
152
  <a href="https://bundlephobia.com/package/polystore" target="_blank"
153
- >just <strong>2.4b</strong></a
153
+ >just <strong>2.4kb</strong></a
154
154
  >
155
155
  (min+gzip), the impact on your app loading time is minimal.
156
156
  </p>
@@ -304,16 +304,14 @@ console.log(await store.entries());
304
304
  </div>
305
305
  </div>
306
306
  <div>
307
- <pre><code class="language-js">import kv from "polystore";
308
- const store = kv(new Map());
307
+ <pre><code class="language-js">await store.get("key"); // null
309
308
 
310
- const auth = store.prefix(&quot;auth:&quot;);
311
- auth.set(&quot;key1&quot;, &quot;value1&quot;);
312
- console.log(await auth.entries());
313
- // [[&quot;key1&quot;, &quot;value1&quot;]]
309
+ await store.set("key", "value", { expires: "1s" });
310
+ await store.get("key"); // "value"
314
311
 
315
- console.log(await store.entries());
316
- // [[&quot;auth:key1&quot;, &quot;value1&quot;]]</code></pre>
312
+ await sleep(2000);
313
+
314
+ await store.get("key"); // null</code></pre>
317
315
  </div>
318
316
  </section>
319
317
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polystore",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "A small compatibility layer for many popular KV stores like localStorage, Redis, FileSystem, etc.",
5
5
  "homepage": "https://github.com/franciscop/polystore",
6
6
  "repository": "https://github.com/franciscop/polystore.git",
package/src/index.js CHANGED
@@ -315,4 +315,4 @@ class Store {
315
315
  }
316
316
  }
317
317
 
318
- export default kv = (client) => new Store(client);
318
+ export default (client) => new Store(client);