🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

pinia-cache-plugin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pinia-cache-plugin - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+6
-6
dist/index.d.ts

@@ -7,3 +7,3 @@ import { PiniaPlugin } from 'pinia';

}
interface DefCachePiniaPluginOptions {
interface DefPiniaCachePluginOptions {
allCache: boolean;

@@ -14,3 +14,3 @@ excludeNameArray: string[];

}
interface CachePiniaPluginOptions extends Partial<DefCachePiniaPluginOptions> {
interface PiniaCachePluginOptions extends Partial<DefPiniaCachePluginOptions> {
}

@@ -21,9 +21,9 @@ /**

* const store = createPinia();
* store.use(cachePiniaPlugin(options))
* store.use(piniaCachePlugin(options))
* ```
* @param options {@link CachePiniaPluginOptions}
* @param options {@link PiniaCachePluginOptions}
* @returns PiniaPlugin
*/
declare const cachePiniaPlugin: (options?: CachePiniaPluginOptions) => PiniaPlugin;
declare const piniaCachePlugin: (options?: PiniaCachePluginOptions) => PiniaPlugin;
export { cachePiniaPlugin as default };
export { piniaCachePlugin as default };
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.cachePiniaPlugin = factory());
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.piniaCachePlugin = factory());
})(this, (function () { 'use strict';

@@ -17,8 +17,8 @@

* const store = createPinia();
* store.use(cachePiniaPlugin(options))
* store.use(piniaCachePlugin(options))
* ```
* @param options {@link CachePiniaPluginOptions}
* @param options {@link PiniaCachePluginOptions}
* @returns PiniaPlugin
*/
var cachePiniaPlugin = function (options) {
var piniaCachePlugin = function (options) {
// 参数合并

@@ -117,4 +117,4 @@ var _options = Object.assign({

return cachePiniaPlugin;
return piniaCachePlugin;
}));

@@ -11,8 +11,8 @@ // 存储在localStorage的key

* const store = createPinia();
* store.use(cachePiniaPlugin(options))
* store.use(piniaCachePlugin(options))
* ```
* @param options {@link CachePiniaPluginOptions}
* @param options {@link PiniaCachePluginOptions}
* @returns PiniaPlugin
*/
var cachePiniaPlugin = function (options) {
var piniaCachePlugin = function (options) {
// 参数合并

@@ -111,2 +111,2 @@ var _options = Object.assign({

export { cachePiniaPlugin as default };
export { piniaCachePlugin as default };
{
"name": "pinia-cache-plugin",
"version": "1.0.0",
"version": "1.0.1",
"description": "pinia state cache plugin (pinia状态持久化缓存插件)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,2 +16,3 @@ # pinia-cache-plugin

import { createPinia } from 'pinia';
import piniaCachePlugin from 'pinia-cache-plugin';

@@ -29,3 +30,3 @@ const store = createPinia();

}, */
store.use(cachePiniaPlugin(options));
store.use(piniaCachePlugin(options));
```

@@ -32,0 +33,0 @@