npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@serve-tools/signal-effect

v0.1.4

Published

Microtask-batched effects for TC39 Signals

Readme

@serve-tools/signal-effect

The @serve-tools/signal-effect package provides microtask-batched effects for TC39 Signals, built on @serve-tools/signal.

import { Signal } from "@serve-tools/signal";
import { effect } from "@serve-tools/signal-effect";

const value = new Signal.State("initial");
const dispose = effect(() => console.log(value.get()));

value.set("updated");

dispose();

Install

npm install @serve-tools/signal @serve-tools/signal-effect

Effect depends on @serve-tools/signal. Applications that import Signal directly should also declare it so package managers can share one compatible installation.

Effects run synchronously once, then batch subsequent invalidations onto the next microtask. createEffect provides a dormant controller for consumers that must register disposal before the initial run.

import { createEffect } from "@serve-tools/signal-effect";

const controller = createEffect(() => console.log(value.get()));

addEventListener("pagehide", controller.dispose, { once: true });
controller.start();

Disposal is idempotent and skips an effect that was already pending. If an initial run throws, its controller disposes itself before rethrowing. During a batch, later effects still run after an earlier failure; multiple failures are combined in an AggregateError.

Public API

  • effect(run) executes immediately, tracks the signals read by run, and returns an idempotent disposer.
  • createEffect(run) returns a dormant Effect controller with start() and dispose().
  • Effect describes the dormant controller, and Dispose describes an effect disposer.

Compatibility

The package is an ES module for JavaScript runtimes with queueMicrotask and a compatible @serve-tools/signal installation. It does not install global APIs.

Agent Skill

This package includes skills/serve-tools-signal-effect/SKILL.md with version-aligned usage guidance for compatible coding agents. Activation is explicit; installing the package does not automatically trust or enable it.

Development

The default test command runs the scheduler suite in Node.js, Chromium, Firefox, and WebKit.

npm test --workspace @serve-tools/signal-effect

Run the opt-in scheduler and fanout benchmarks with:

npm run benchmark --workspace @serve-tools/signal-effect

License

MIT-0