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.21 to 1.0.0-beta.22

2

build/index.es.js

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

import e from"zustand/vanilla";export{default as createStore}from"zustand/vanilla";import*as t from"vue";const r=(e,t,r,n)=>{if(!r||!n)return!0;const o=r(t),c=r(e);return void 0!==n&&!n(o,c)};function n(e,n,o,c,u){const i=Object.keys(e),s=t.reactive(e);return new Proxy(s,{get:(e,t)=>(i.includes(t)&&(n[t]||(n[t]=o.subscribe(((e,n)=>{r(e,n,c,u)&&(s[t]=c?c(e)[t]:e[t])})))),e[t])})}function o(e,t,n,o,c,u){const i=Object.keys(e);t||(t={},i.forEach((i=>{if(n[i])return;let s=e[i];n[i]=o.subscribe(((e,n)=>{if(!r(e,n,c,u))return;if(e[i]===t[i])return;const o=e[i]instanceof Array;e[i];o?(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 c(e,c,u){var i;const s=e.getState(),f=c?c(s):s,a=(null==f?void 0:f.constructor)===Object,l="function"==typeof f,b={};if(t.set||(null===(i=t.default)||void 0===i?void 0:i.set)){let t;return o(s,t,b,e,c,u)}if(void 0===f)return t.ref(void 0);if(a)return"undefined"==typeof Proxy?(((e,t,n,o,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]=n.subscribe(((t,n)=>{r(t,n,o,c)&&(e[i]=o?o(t)[i]:t[i])})))),s),set:e=>{e!==s&&(s=e)}})}))})(f,b,e,c,u),t.reactive(f)):n(f,b,e,c,u);{const n=t.ref(f);return e.subscribe(((e,t)=>{r(e,t,c,u)&&(n.value=c?c(e):e)})),l?n.value:n}}const u=t=>{const r="function"==typeof t?e(t):t;return Object.assign(((e,t)=>c(r,e,t)),r)};export{u as create,u as default,n as defineProxy,o as defineSet};
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};

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("zustand/vanilla");function t(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 r=t(require("vue"));const n=(e,t,r,n)=>{if(!r||!n)return!0;const c=r(t),o=r(e);return void 0!==n&&!n(c,o)};function c(e,t,c,o,u){const i=Object.keys(e),s=r.reactive(e);return new Proxy(s,{get:(e,r)=>(i.includes(r)&&(t[r]||(t[r]=c.subscribe(((e,t)=>{n(e,t,o,u)&&(s[r]=o?o(e)[r]:e[r])})))),e[r])})}function o(e,t,r,c,o,u){const i=Object.keys(e);t||(t={},i.forEach((i=>{if(r[i])return;let s=e[i];r[i]=c.subscribe(((e,r)=>{if(!n(e,r,o,u))return;if(e[i]===t[i])return;const c=e[i]instanceof Array;e[i];c?(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 o?o(t):t}function u(e,t,u){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(r.set||(null===(i=r.default)||void 0===i?void 0:i.set)){let r;return o(s,r,b,e,t,u)}if(void 0===f)return r.ref(void 0);if(a)return"undefined"==typeof Proxy?(((e,t,r,c,o)=>{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)=>{n(t,r,c,o)&&(e[i]=c?c(t)[i]:t[i])})))),s),set:e=>{e!==s&&(s=e)}})}))})(f,b,e,t,u),r.reactive(f)):c(f,b,e,t,u);{const c=r.ref(f);return e.subscribe(((e,r)=>{n(e,r,t,u)&&(c.value=t?t(e):e)})),l?c.value:c}}const i=t=>{const r="function"==typeof t?e(t):t;return Object.assign(((e,t)=>u(r,e,t)),r)};exports.createStore=e,exports.create=i,exports.default=i,exports.defineProxy=c,exports.defineSet=o;
"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;
import { StoreApi } from "zustand/vanilla";
import { TSubscribeCache, TObject } from "./vue";
import { TObject, TSubscribeCache } from "./vue";
export declare const executeEqualityFn: <T, S>(nextState: T, previousState: T, selection?: (state: T) => S, equalityFn?: (a: S, b: S) => boolean) => boolean;

@@ -4,0 +4,0 @@ export declare function defineProxy<T, S>(store: S, subscribeCache: TSubscribeCache, api: StoreApi<T>, selection?: (state: T) => S, equalityFn?: (a: S, b: S) => boolean): object;

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

import createStore, { StateCreator, StoreApi, StoreMutatorIdentifier, Mutate } from "zustand/vanilla";
import * as Vue from "vue";
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 { createStore, StateCreator, StoreApi, create, defineProxy, defineSet, };
export { StateCreator, StoreApi, create, createStore, defineProxy, defineSet };
{
"name": "zustand-vue",
"version": "1.0.0-beta.21",
"version": "1.0.0-beta.22",
"description": "State management for vue based on zustand",

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

"build": "npx rollup -c --bundleConfigAsCjs",
"dev": "npx rollup -c -w --development --bundleConfigAsCjs"
"dev": "npx rollup -c -w --development --bundleConfigAsCjs",
"pub": "npx vergo run -b -m main && npm publish",
"pub-pro": "npx vergo run -m main"
},

@@ -44,2 +46,3 @@ "sideEffects": false,

"devDependencies": {
"vergo": "0.0.1-beta.46",
"@rollup/plugin-babel": "^6.0.2",

@@ -51,3 +54,2 @@ "@rollup/plugin-node-resolve": "^15.0.1",

"eslint": "^8.29.0",
"rollup": "^4.12.0",
"rollup-plugin-commonjs": "^10.1.0",

@@ -54,0 +56,0 @@ "rollup-plugin-livereload": "^2.0.5",

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