Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@wcstack/debounce

Latest version: v4.29.0

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: mogera551
7 Stars
0 Forks
75 Versions
4.9K Downloads
TypeScript Repo language

Scan summary

@wcstack/debounce was last scanned on 24 Nov 2026 at version 4.29.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 75 versions; the latest 4 were published within 7 days (18–24 Nov 2026).
  • Findings: No rules fired in version 4.29.0.
  • Downloads: 4,949 downloads.

Versions

75 versions published
Versions and the rules that fired in each
VersionPublishedStatus
4.29.0 LATEST 24 Nov 2026 No rules fired
4.28.0 23 Nov 2026 No rules fired
4.27.0 23 Nov 2026 No rules fired
4.26.0 18 Nov 2026 Not shown
4.25.0 17 Nov 2026 Not shown

No rules fired in 4.29.0

Findings

Findings for v4.29.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 4.29.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@wcstack/debounce

🤖 AI coding agents: This README is a package-level reference, not the primary entry point for building a wcstack application. If you have not already done so, first read the repository README and AGENTS.md, then use the wcstack-app skill.

@wcstack/debounce is a headless debounce / throttle component for the wcstack ecosystem.

It is not a visual UI widget. It is an async primitive node that coalesces a noisy stream of signals into a single quiet-period emission — the same way @wcstack/timer turns the passage of time into reactive state.

It ships two custom elements over one engine:

  • <wcs-debounce> — emit once after the signal has been idle for wait ms.
  • <wcs-throttle> — emit at most once per wait ms (debounce with maxWait === wait, leading on).

@wcstack/debounce follows the CSBC (Core / Shell / Binding Contract) architecture:

  • Core (DebounceCore) ports lodash's debounce algorithm (leading / trailing / maxWait) and publishes results as events.
  • Shell (<wcs-debounce> / <wcs-throttle>) connects that engine to DOM attributes, lifecycle, and declarative commands.
  • Binding Contract (static wcBindable) declares observable properties, writable inputs, and callable commands.

Two surfaces

The essence is "debouncing a signal". A signal can carry a value or be a bare pulse with arguments, so there are two surfaces — use one per element.

Value surface — source → value

Write to source; after the quiet period the debounced value is published on the value property (event wcs-debounce:settled). Wire it as source: src; value: debounced — value flows back into state.

Signal surface — trigger(...args) → fired

Call the trigger command repeatedly; after the quiet period one wcs-debounce:fired event carries the last args. Because state cannot read a transient pulse as a value, the relay uses tokens:

source →(command-token)→ debounce.trigger →[coalesce]→ fired →(event-token)→ state → target.method

State fires the entry with the command-token protocol (command.trigger: $command.X) and receives the single coalesced pulse with the event-token protocol (eventToken.fired: Y), then re-dispatches it to the real method.

A single element instance is meant for one surface. If both source and trigger are driven on the same element, the last scheduled signal wins (lodash's last-args semantics).

Install

npm install @wcstack/debounce

Quick Start

1. Debounce an input value
<script type="module" src="https://esm.run/@wcstack/debounce/auto"></script>
<script type="module" src="https://esm.run/@wcstack/state/auto"></script>

<wcs-state>
  <script type="module">
    export default {
      query: "",
      debouncedQuery: null // the element writes null until the first settle
    };
  </script>
</wcs-state>

<input data-wcs="value: query">
<wcs-debounce wait="300" data-wcs="source: query; value: debouncedQuery"></wcs-debounce>
<p>Searching for: {{ debouncedQuery }}</p>
2. Debounce a method call (signal surface)
<wcs-state>
  <script type="module">
    export default {
      $commandTokens: ["search"],
      $eventTokens: ["searchSettled"],
      results: [],
      onSearchInput(e) {
        // Emit the query string, not the event: a command emitted from an
        // `oninput:` binding receives the Event as its first argument, and
        // `<wcs-debounce>` keeps the args verbatim.
        this.$command.search.emit(e.target.value);
      },
      $on: {
        searchSettled: (state, event) => {
          // fires once, 300ms after the last keystroke
          const [q] = event.detail.args;
          state.results = doSearch(q);
        }
      }
    };
  </script>
</wcs-state>

<input data-wcs="oninput: onSearchInput">
<wcs-debounce
  wait="300"
  data-wcs="command.trigger: $command.search; eventToken.fired: searchSettled">
</wcs-debounce>
3. Throttle a fast value stream
<wcs-throttle wait="100" data-wcs="source: scrollY; value: throttledScrollY"></wcs-throttle>

<wcs-throttle> leads by default (emits immediately, then at most once per wait ms).

Attributes / Inputs

Attribute Type Default (<wcs-debounce>) Default (<wcs-throttle>) Description
wait number 250 250 Quiet period in ms. Invalid / negative / non-numeric values fall back to the default.
leading boolean off on (no-leading opts out) Emit on the first signal of a burst. On <wcs-throttle> the leading property reads and writes no-leading.
no-trailing boolean off (trailing on) off (trailing on) Opt out of the trailing-edge emission.
max-wait number none wait Force an emission at least every max-wait ms under continuous input. Clamped to >= wait.
source any — — Value-surface input; its debounced echo returns on value.

null and undefined. The inputs backed by an attribute (wait, leading, trailing, maxWait) take null as "clear": the attribute is removed and the input falls back to its default — for trailing, whose attribute is the inverted no-trailing, and for <wcs-throttle>'s leading, whose attribute is no-leading, that means on again. undefined means "no value supplied": the attribute goes back to what it was before the first write — the value written in the markup, or none. Neither is ever written as the string "null" / "undefined". (@wcstack/state never writes undefined; React 19 does when a prop that had a value is removed, and so can a direct assignment.) source is not backed by an attribute: null and undefined are values like any other, debounced through to value.

Observable Properties (outputs)

Property Event Description
value wcs-debounce:settled The debounced value of the latest source write; null until the first settle.
fired wcs-debounce:fired The coalesced args of the latest trigger() pulse.
pending wcs-debounce:pending-changed true while a debounce is in flight.

<wcs-throttle> publishes the same shape under the wcs-throttle:* namespace.

value starts as null (since 4.26; up to 4.25 it was undefined). value is an output-only member, so an @wcstack/state binding (value: debouncedQuery) reads it from the element when it attaches: the starting value the state declared is replaced by null until the first settle. Declare it null (debouncedQuery: null) and treat null as "nothing settled yet": a state that declares "" sees it become null on load, and a $watch on it runs with that null. Up to 4.25 the seed was undefined, so a $watch ran with undefined even when the state declared null. cancel, flush and a disconnect leave the last settled value as it is. A source of undefined settles as undefined: source carries what it is given.

Commands

Command Description
trigger Signal-surface entry: coalesce a pulse carrying ...args.
cancel Drop any pending emission without firing (getters keep values).
flush Emit any buffered payload immediately (no-op if nothing pending).

CSS styling with :state()

<wcs-debounce> / <wcs-throttle> reflect one boolean output state onto their ElementInternals CustomStateSet, so you can style them directly from CSS with the :state() pseudo-class — no data-wcs binding or extra class toggling required.

State On when
pending wcs-debounce:pending-changed fires with true (cleared on false)

<wcs-throttle> reflects the same pending state from its own wcs-throttle:pending-changed event (it shares the Debounce base class, but the event namespace — and therefore the wiring — tracks its own eventPrefix).

.spinner { display: none; }                                /* default */
wcs-debounce:state(pending) ~ .spinner { display: block; } /* while debouncing */

wcs-throttle:state(pending) ~ .indicator { opacity: 1; }

Unlike attributes or classes, :state() cannot be written from outside the element, so there is no risk of confusing this output state with an input.

Browser support (:state(x) syntax): Chrome/Edge 125+, Safari 17.4+, Firefox 126+. In older browsers the states are simply never set — :state() selectors never match, but <wcs-debounce> / <wcs-throttle> themselves keep working normally (graceful degradation, never-throw).

SSR: :state() cannot be serialized into HTML, so server-rendered markup never carries these states on first paint. If you need to style the pre-hydration gap, pair your rule with wcs-debounce:not(:defined) instead.

Debugging

Custom states are invisible in DevTools' Elements panel and attachInternals() cannot be called twice, so there is no console way to inspect them directly. Two debug-only aids are provided for that:

  • el.debugStates — a snapshot array of the currently-on state names (e.g. ["pending"]). It is not part of wc-bindable (not a bind target) and its shape is not a guaranteed contract — use it for debugging only.

  • The debug-states attribute (opt-in, default off) mirrors state changes onto a data-wcs-state-pending attribute on the element, so the Elements panel highlights it as it toggles:

    <wcs-debounce wait="300" debug-states></wcs-debounce>

*Write your CSS against :state(), not `data-wcs-state-`.** The mirrored attribute exists purely to make state changes visible while debugging with DevTools open; it is not a supported styling hook.

Optional DOM Triggering

When config.autoTrigger is on (default), a click on an element carrying data-debouncetarget="<id>" fires a single coalesced trigger() pulse on the referenced <wcs-debounce> / <wcs-throttle> (the click's default action is suppressed).

Headless usage (DebounceCore)

The Core has no DOM dependency and can be used directly with bind() from @wc-bindable/core:

import { DebounceCore } from "@wcstack/debounce";

const core = new DebounceCore("wcs-debounce", undefined, { wait: 300 });
core.addEventListener("wcs-debounce:settled", (e) => {
  console.log((e as CustomEvent).detail.value);
});
core.setSource("a");
core.setSource("b"); // only "b" settles, 300ms later

Throttle is the same engine with a different prefix and maxWait === wait:

const throttle = new DebounceCore("wcs-throttle", undefined, { wait: 100, leading: true, maxWait: 100 });

The structural Core surface is normative across wcstack IO nodes (async-io-node-guidelines §3.9); to bind it into signals with no element at all, see @wcstack/signals — Binding a Core directly.

License

MIT

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @wcstack/debounce

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229