summitjs 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/summit.cjs CHANGED
@@ -54,6 +54,7 @@ function track(dep) {
54
54
  }
55
55
  }
56
56
  function trigger(dep) {
57
+ if (dep.size === 0) return;
57
58
  const effects = [...dep];
58
59
  for (const eff of effects) {
59
60
  if (eff === activeEffect) continue;
@@ -87,8 +88,8 @@ function batch(fn) {
87
88
  }
88
89
  function flushBatch() {
89
90
  if (pendingEffects.size === 0) return;
90
- const effects = [...pendingEffects];
91
- pendingEffects.clear();
91
+ const effects = pendingEffects;
92
+ pendingEffects = /* @__PURE__ */ new Set();
92
93
  for (const eff of effects) {
93
94
  if (eff.active) runEffect(eff);
94
95
  }
@@ -250,8 +251,8 @@ function queueJob(job) {
250
251
  }
251
252
  }
252
253
  function flushJobs() {
253
- const jobs = [...queue];
254
- queue.clear();
254
+ const jobs = queue;
255
+ queue = /* @__PURE__ */ new Set();
255
256
  flushing = false;
256
257
  flushPromise = null;
257
258
  for (const job of jobs) job();
@@ -1822,7 +1823,7 @@ function compileExpression(source) {
1822
1823
  }
1823
1824
 
1824
1825
  // src/errors.ts
1825
- var DOCS = "https://velofy.github.io/summit";
1826
+ var DOCS = "https://velofy.github.io/summitjs";
1826
1827
  function distance(a, b) {
1827
1828
  const m = a.length;
1828
1829
  const n = b.length;