@cdellacqua/debounce
Advanced tools
Comparing version 1.1.0 to 1.1.1
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(f,m){typeof exports=="object"&&typeof module!="undefined"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(f=typeof globalThis!="undefined"?globalThis:f||self,m(f.debounce={}))})(this,function(f){"use strict";function m(){const e=[];function i(n){for(const s of e)s(n)}function c(n){const s=e.indexOf(n);s!==-1&&e.splice(s,1)}function r(n){return e.indexOf(n)===-1&&e.push(n),()=>c(n)}function o(n){const s=r(a=>{s(),n(a)});return s}return{emit:i,subscribe:r,subscribeOnce:o,get nOfSubscriptions(){return e.length}}}/** | ||
(function(f,m){typeof exports=="object"&&typeof module!="undefined"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(f=typeof globalThis!="undefined"?globalThis:f||self,m(f.debounce={}))})(this,function(f){"use strict";function m(){const e=[];function i(n){for(const s of[...e])s(n)}function c(n){const s=e.indexOf(n);s!==-1&&e.splice(s,1)}function r(n){return e.indexOf(n)===-1&&e.push(n),()=>c(n)}function o(n){const s=r(a=>{s(),n(a)});return s}return{emit:i,subscribe:r,subscribeOnce:o,get nOfSubscriptions(){return e.length}}}/** | ||
* @license | ||
@@ -3,0 +3,0 @@ * Copyright (c) 2016-22 [these people](https://github.com/sveltejs/svelte/graphs/contributors) |
@@ -5,3 +5,3 @@ { | ||
"description": "Debounce a function with requestAnimationFrame or a custom interval", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"type": "module", | ||
@@ -72,4 +72,4 @@ "types": "dist/index.d.ts", | ||
"dependencies": { | ||
"universal-stores": "^1.1.0" | ||
"universal-stores": "^1.1.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
22869
0
Updateduniversal-stores@^1.1.2