universal-stores
Advanced tools
Comparing version 1.1.1 to 1.1.2
function makeSignal() { | ||
const subscribers = []; | ||
function emit(v) { | ||
for (const subscriber of subscribers) { | ||
for (const subscriber of [...subscribers]) { | ||
subscriber(v); | ||
@@ -6,0 +6,0 @@ } |
@@ -1,2 +0,2 @@ | ||
(function(o,a){typeof exports=="object"&&typeof module!="undefined"?a(exports):typeof define=="function"&&define.amd?define(["exports"],a):(o=typeof globalThis!="undefined"?globalThis:o||self,a(o.universalStores={}))})(this,function(o){"use strict";function a(){const u=[];function e(t){for(const c of u)c(t)}function n(t){const c=u.indexOf(t);c!==-1&&u.splice(c,1)}function s(t){return u.indexOf(t)===-1&&u.push(t),()=>n(t)}function r(t){const c=s(b=>{c(),t(b)});return c}return{emit:e,subscribe:s,subscribeOnce:r,get nOfSubscriptions(){return u.length}}}/** | ||
(function(o,a){typeof exports=="object"&&typeof module!="undefined"?a(exports):typeof define=="function"&&define.amd?define(["exports"],a):(o=typeof globalThis!="undefined"?globalThis:o||self,a(o.universalStores={}))})(this,function(o){"use strict";function a(){const u=[];function e(t){for(const c of[...u])c(t)}function n(t){const c=u.indexOf(t);c!==-1&&u.splice(c,1)}function s(t){return u.indexOf(t)===-1&&u.push(t),()=>n(t)}function r(t){const c=s(b=>{c(),t(b)});return c}return{emit:e,subscribe:s,subscribeOnce:r,get nOfSubscriptions(){return u.length}}}/** | ||
* @license | ||
@@ -3,0 +3,0 @@ * Copyright (c) 2016-22 [these people](https://github.com/sveltejs/svelte/graphs/contributors) |
@@ -5,3 +5,3 @@ { | ||
"description": "State management made simple", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"type": "module", | ||
@@ -71,4 +71,4 @@ "types": "dist/index.d.ts", | ||
"dependencies": { | ||
"@cdellacqua/signals": "^4.1.0" | ||
"@cdellacqua/signals": "^4.1.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
36563
Updated@cdellacqua/signals@^4.1.1