Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zustand-vue

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zustand-vue - npm Package Compare versions

Comparing version 1.0.0-beta.23 to 1.0.0-beta.24

2

build/index.es.js

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

import*as e from"vue";import t from"zustand/vanilla";export{default as createStore}from"zustand/vanilla";const r=(e,t,r,n)=>{if(!r||!n)return!0;const o=r(t),i=r(e);return void 0!==n&&!n(o,i)};function n(t,n,o,i,c){const s=["__v_raw","__v_isReadonly","__v_isRef","toJSON","toString","valueOf",Symbol.toStringTag,"Symbol(Symbol.toStringTag)"],u=e.reactive(t);return new Proxy(u,{get:(e,t)=>(n[t]||s.includes(t)||(n[t]=o.subscribe(((e,n)=>{r(e,n,i,c)&&(console.log(i?i(e)[t]:e[t],t),u[t]=i?i(e)[t]:e[t])}))),e[t])})}function o(e,t,n,o,i,c){const s=Object.keys(e);t||(t={},s.forEach((s=>{if(n[s])return;let u=e[s];n[s]=o.subscribe(((e,n)=>{if(!r(e,n,i,c))return;if(e[s]===t[s])return;const o=e[s]instanceof Array;e[s];o?(t[s]||(t[s]=[]),t[s].splice(0,t[s].length,...e[s])):t[s]=e[s]})),Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>u,set:e=>{e!==u&&(u=e)}})})));return i?i(t):t}function i(t,i,c){var s;const u=t.getState(),a=i?i(u):u,f=(null==a?void 0:a.constructor)===Object,l="function"==typeof a,b={};if(e.set||(null===(s=e.default)||void 0===s?void 0:s.set)){let e;return o(u,e,b,t,i,c)}if(f)return"undefined"==typeof Proxy?(((e,t,n,o,i)=>{const c=Object.keys(e);c.forEach((s=>{let u=e[s];Object.defineProperty(e,s,{enumerable:!0,configurable:!0,get:()=>(c.includes(s)&&(t[s]||(t[s]=n.subscribe(((t,n)=>{r(t,n,o,i)&&(e[s]=o?o(t)[s]:t[s])})))),u),set:e=>{e!==u&&(u=e)}})}))})(a,b,t,i,c),e.reactive(a)):n(a,b,t,i,c);{const n=e.ref(a);return t.subscribe(((e,t)=>{r(e,t,i,c)&&(n.value=i?i(e):e)})),l?n.value:n}}const c=e=>{const r="function"==typeof e?t(e):e;return Object.assign(((e,t)=>i(r,e,t)),r)};export{c as create,c as default,n as defineProxy,o as defineSet};
import*as e from"vue";import{createStore as t}from"zustand/vanilla";export{createStore}from"zustand/vanilla";const r=(e,t,r,n)=>{if(!r||!n)return!0;const o=r(t),i=r(e);return void 0!==n&&!n(o,i)};function n(t,n,o,i,c){const u=["__v_raw","__v_isReadonly","__v_isRef","toJSON","toString","valueOf",Symbol.toStringTag,"Symbol(Symbol.toStringTag)"],s=e.reactive(t);return new Proxy(s,{get:(e,t)=>(n[t]||u.includes(t)||(n[t]=o.subscribe(((e,n)=>{r(e,n,i,c)&&(s[t]=i?i(e)[t]:e[t])}))),e[t])})}function o(e,t,n,o,i,c){const u=Object.keys(e);t||(t={},u.forEach((u=>{if(n[u])return;let s=e[u];n[u]=o.subscribe(((e,n)=>{if(!r(e,n,i,c))return;if(e[u]===t[u])return;const o=e[u]instanceof Array;e[u];o?(t[u]||(t[u]=[]),t[u].splice(0,t[u].length,...e[u])):t[u]=e[u]})),Object.defineProperty(t,u,{enumerable:!0,configurable:!0,get:()=>s,set:e=>{e!==s&&(s=e)}})})));return i?i(t):t}function i(t,i,c){var u;const s=t.getState(),a=i?i(s):s,f=(null==a?void 0:a.constructor)===Object,l="function"==typeof a,b={};if(e.set||(null===(u=e.default)||void 0===u?void 0:u.set)){let e;return o(s,e,b,t,i,c)}if(f)return"undefined"==typeof Proxy?(((e,t,n,o,i)=>{const c=Object.keys(e);c.forEach((u=>{let s=e[u];Object.defineProperty(e,u,{enumerable:!0,configurable:!0,get:()=>(c.includes(u)&&(t[u]||(t[u]=n.subscribe(((t,n)=>{r(t,n,o,i)&&(e[u]=o?o(t)[u]:t[u])})))),s),set:e=>{e!==s&&(s=e)}})}))})(a,b,t,i,c),e.reactive(a)):n(a,b,t,i,c);{const n=e.ref(a);return t.subscribe(((e,t)=>{r(e,t,i,c)&&(n.value=i?i(e):e)})),l?n.value:n}}const c=e=>{const r="function"==typeof e?t(e):e;return Object.assign(((e,t)=>i(r,e,t)),r)};export{c as create,c as default,n as defineProxy,o as defineSet};

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("zustand/vanilla");function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(e);const o=(e,t,r,n)=>{if(!r||!n)return!0;const o=r(t),c=r(e);return void 0!==n&&!n(o,c)};function c(e,t,r,c,u){const i=["__v_raw","__v_isReadonly","__v_isRef","toJSON","toString","valueOf",Symbol.toStringTag,"Symbol(Symbol.toStringTag)"],s=n.reactive(e);return new Proxy(s,{get:(e,n)=>(t[n]||i.includes(n)||(t[n]=r.subscribe(((e,t)=>{o(e,t,c,u)&&(console.log(c?c(e)[n]:e[n],n),s[n]=c?c(e)[n]:e[n])}))),e[n])})}function u(e,t,r,n,c,u){const i=Object.keys(e);t||(t={},i.forEach((i=>{if(r[i])return;let s=e[i];r[i]=n.subscribe(((e,r)=>{if(!o(e,r,c,u))return;if(e[i]===t[i])return;const n=e[i]instanceof Array;e[i];n?(t[i]||(t[i]=[]),t[i].splice(0,t[i].length,...e[i])):t[i]=e[i]})),Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>s,set:e=>{e!==s&&(s=e)}})})));return c?c(t):t}function i(e,t,r){var i;const s=e.getState(),f=t?t(s):s,a=(null==f?void 0:f.constructor)===Object,l="function"==typeof f,b={};if(n.set||(null===(i=n.default)||void 0===i?void 0:i.set)){let n;return u(s,n,b,e,t,r)}if(a)return"undefined"==typeof Proxy?(((e,t,r,n,c)=>{const u=Object.keys(e);u.forEach((i=>{let s=e[i];Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>(u.includes(i)&&(t[i]||(t[i]=r.subscribe(((t,r)=>{o(t,r,n,c)&&(e[i]=n?n(t)[i]:t[i])})))),s),set:e=>{e!==s&&(s=e)}})}))})(f,b,e,t,r),n.reactive(f)):c(f,b,e,t,r);{const c=n.ref(f);return e.subscribe(((e,n)=>{o(e,n,t,r)&&(c.value=t?t(e):e)})),l?c.value:c}}const s=e=>{const r="function"==typeof e?t(e):e;return Object.assign(((e,t)=>i(r,e,t)),r)};exports.createStore=t,exports.create=s,exports.default=s,exports.defineProxy=c,exports.defineSet=u;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("zustand/vanilla");function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(e);const o=(e,t,r,n)=>{if(!r||!n)return!0;const o=r(t),c=r(e);return void 0!==n&&!n(o,c)};function c(e,t,r,c,u){const i=["__v_raw","__v_isReadonly","__v_isRef","toJSON","toString","valueOf",Symbol.toStringTag,"Symbol(Symbol.toStringTag)"],s=n.reactive(e);return new Proxy(s,{get:(e,n)=>(t[n]||i.includes(n)||(t[n]=r.subscribe(((e,t)=>{o(e,t,c,u)&&(s[n]=c?c(e)[n]:e[n])}))),e[n])})}function u(e,t,r,n,c,u){const i=Object.keys(e);t||(t={},i.forEach((i=>{if(r[i])return;let s=e[i];r[i]=n.subscribe(((e,r)=>{if(!o(e,r,c,u))return;if(e[i]===t[i])return;const n=e[i]instanceof Array;e[i];n?(t[i]||(t[i]=[]),t[i].splice(0,t[i].length,...e[i])):t[i]=e[i]})),Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>s,set:e=>{e!==s&&(s=e)}})})));return c?c(t):t}function i(e,t,r){var i;const s=e.getState(),f=t?t(s):s,a=(null==f?void 0:f.constructor)===Object,l="function"==typeof f,b={};if(n.set||(null===(i=n.default)||void 0===i?void 0:i.set)){let n;return u(s,n,b,e,t,r)}if(a)return"undefined"==typeof Proxy?(((e,t,r,n,c)=>{const u=Object.keys(e);u.forEach((i=>{let s=e[i];Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>(u.includes(i)&&(t[i]||(t[i]=r.subscribe(((t,r)=>{o(t,r,n,c)&&(e[i]=n?n(t)[i]:t[i])})))),s),set:e=>{e!==s&&(s=e)}})}))})(f,b,e,t,r),n.reactive(f)):c(f,b,e,t,r);{const c=n.ref(f);return e.subscribe(((e,n)=>{o(e,n,t,r)&&(c.value=t?t(e):e)})),l?c.value:c}}const s=e=>{const r="function"==typeof e?t.createStore(e):e;return Object.assign(((e,t)=>i(r,e,t)),r)};Object.defineProperty(exports,"createStore",{enumerable:!0,get:function(){return t.createStore}}),exports.create=s,exports.default=s,exports.defineProxy=c,exports.defineSet=u;
import * as Vue from "vue";
import createStore, { Mutate, StateCreator, StoreApi, StoreMutatorIdentifier } from "zustand/vanilla";
import { createStore, Mutate, StateCreator, StoreApi, StoreMutatorIdentifier } from "zustand/vanilla";
import { defineProxy, defineSet } from "./proxy";

@@ -24,2 +24,2 @@ export type ExtractState<S> = S extends {

declare const create: Create;
export { StateCreator, StoreApi, create, createStore, defineProxy, defineSet };
export { create, createStore, defineProxy, defineSet, StateCreator, StoreApi };
{
"name": "zustand-vue",
"version": "1.0.0-beta.23",
"version": "1.0.0-beta.24",
"description": "State management for vue based on zustand",

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

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