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

@figliolia/signals

v1.2.2

Published

A signals implemenation loosely based on the TC39 Proposal

Readme

Signals

A light-weight signals implementation that can be bound to any UI framework or library.

The implementation borrows some of the API from Angular Signals and the TC39 Proposal while aiming to yield smaller bundle sizes and better portability between UI frameworks.

To accomplish the portability aspect, changed values are piped through an event emitter that can be consumed anywhere in your code without needing effects or static analysis. This will allow you to easily build abstractions or frameworks on top of the API.

Installation

npm i @figliolia/signals

API

Signals

Signals are primitive reactive values that can be used to store and derive application state from

import { Signal } from "@figliolia/signals";

const signal = new Signal(1);

// get the current value
signal.get();

// set new values
signal.set(2);

// transform values
signal.update(previous => previous + 1);

// subscribe to changes
const listener = signal.listen(currentValue => {
  // on value change
});

// unsubscribe from changes
listener();

Computed

Computed signals are readonly signals that derive their value based on a computation of other signals

import { Computed, Signal } from "@figliolia/signals";

const signal1 = new Signal(1);
const signal2 = new Signal(1);

const computed = new Computed(() => signal1.get() + signal2.get());

// subscribe to changes
const listener = computed.listen(currentValue => {
  // on value change
});

// update the computed value
signal1.set(2); // computed === 3
signal2.set(2); // computed === 4

// unsubscribe from changes
listener();

Effect

Effects are callback functions that can be executed anytime a signal changes

import { effect, Signal } from "@figliolia/signals";

const signal1 = new Signal(1);
const signal2 = new Signal(1);

// Your effect callback will run on initialization and anytime
// a signal inside changes values
const destroy = effect(() => {
  console.log(signal1.get(), signal2.get());
});

// unregister your effect
destroy();

Functional APIs

If functional programming is a little more your speed, this library comes with signal and computed functions that behave a little more like the Angular Signals API

import { signal, computed } from "@figliolia/signals";

const signal1 = signal(1);
const signal2 = signal(1);

const myComputed = computed(() => signal1() + signal2());

// subscribe to changes
const listener = myComputed.listen(currentValue => {
  // on value change
});

// update the computed value
signal1.set(2); // computed === 3
signal2.set(2); // computed === 4

// unsubscribe from changes
listener();

The TC39 Proposal

This implemenation differs from the TC39 proposal and is likely not going to mirror the native implemenation if the proposal passes.

When designing this API, I read the proposal and aimed to build the necessities of the proposal while omitting some of the internals that developers are likely to be using less often