New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pinia-plugin-persist-uni

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pinia-plugin-persist-uni - npm Package Compare versions

Comparing version 0.0.4 to 1.0.1

4

dist/pinia-persist-uni.es.js

@@ -8,5 +8,5 @@ const updateStorage = (strategy, store) => {

}, {});
uni.setStorageSync(storeKey, JSON.stringify(partialState));
uni.setStorage({ key: storeKey, data: JSON.stringify(partialState) });
} else {
uni.setStorageSync(storeKey, JSON.stringify(store.$state));
uni.setStorage({ key: storeKey, data: JSON.stringify(store.$state) });
}

@@ -13,0 +13,0 @@ };

@@ -1,1 +0,1 @@

(function(t,i){typeof exports=="object"&&typeof module!="undefined"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(t=typeof globalThis!="undefined"?globalThis:t||self,i(t.piniaPersist={}))})(this,function(t){"use strict";const i=(s,e)=>{const n=s.key||e.$id;if(s.paths){const d=s.paths.reduce((a,u)=>(a[u]=e.$state[u],a),{});uni.setStorageSync(n,JSON.stringify(d))}else uni.setStorageSync(n,JSON.stringify(e.$state))};var o=({options:s,store:e})=>{var n,d,a,u;if((n=s.persist)!=null&&n.enabled){const p=[{key:e.$id}],f=(a=(d=s.persist)==null?void 0:d.strategies)!=null&&a.length?(u=s.persist)==null?void 0:u.strategies:p;f.forEach(r=>{const S=r.key||e.$id,c=uni.getStorageSync(S);c&&(e.$patch(JSON.parse(c)),i(r,e))}),e.$subscribe(()=>{f.forEach(r=>{i(r,e)})})}};t.default=o,t.updateStorage=i,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
(function(t,i){typeof exports=="object"&&typeof module!="undefined"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(t=typeof globalThis!="undefined"?globalThis:t||self,i(t.piniaPersist={}))})(this,function(t){"use strict";const i=(s,e)=>{const a=s.key||e.$id;if(s.paths){const u=s.paths.reduce((n,d)=>(n[d]=e.$state[d],n),{});uni.setStorage({key:a,data:JSON.stringify(u)})}else uni.setStorage({key:a,data:JSON.stringify(e.$state)})};var c=({options:s,store:e})=>{var a,u,n,d;if((a=s.persist)!=null&&a.enabled){const p=[{key:e.$id}],f=(n=(u=s.persist)==null?void 0:u.strategies)!=null&&n.length?(d=s.persist)==null?void 0:d.strategies:p;f.forEach(r=>{const l=r.key||e.$id,o=uni.getStorageSync(l);o&&(e.$patch(JSON.parse(o)),i(r,e))}),e.$subscribe(()=>{f.forEach(r=>{i(r,e)})})}};t.default=c,t.updateStorage=i,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
{
"name": "pinia-plugin-persist-uni",
"version": "0.0.4",
"version": "1.0.1",
"repository": {

@@ -13,3 +13,4 @@ "type": "git",

"docs:build": "vitepress build docs",
"push": "git add . && git commit -m 'update' && git push"
"push": "git add . && git commit -m 'update' && git push",
"npm": "npm version patch && git push"
},

@@ -16,0 +17,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc