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

mali-signali

v1.4.0

Published

A Lightweight, framework-agnostic TypeScript library for reactive state management.

Readme

mali-signali

mali-signali is a lightweight, framework-agnostic TypeScript library for fine-grained reactive state.

It provides:

  • signals for mutable state
  • memos for derived state
  • effects for reactive side effects
  • resources for async derived state
  • stores for isolated reactive graphs

Installation

pnpm add mali-signali
import { batch, effect, memo, resource, signal, untracked } from 'mali-signali';

Quick Start

import { effect, memo, signal } from 'mali-signali';

const [count, setCount] = signal(0);
const doubleCount = memo(() => count() * 2);

effect(() => {
  console.log(`${count()} x 2 = ${doubleCount()}`);
});

setCount(1);
setCount(2);

Async Example

import { effect, resource, signal } from 'mali-signali';

type Wallet = { id: string; balance: number };

const walletId = signal('wallet-1');

const [wallet] = resource<Wallet>(async ({ signal }) => {
  const id = walletId.read();
  const response = await fetch(`/api/wallets/${id}`, { signal });
  return response.json();
});

effect(() => {
  const state = wallet();

  if (state.status === 'loading') {
    console.log('Loading wallet...');
  }

  if (state.status === 'ready') {
    console.log(state.value.balance);
  }
});

Core Concepts

Signals

Signals are mutable reactive values. Reading a signal inside an effect or memo creates a dependency. Updating it re-runs the dependents that use it.

API reference: docs/api/signals.md

Memos

Memos are derived read-only signals. They recompute automatically when their dependencies change and are best used for idempotent derived values.

API reference: docs/api/memos.md

Effects

Effects react to signal, memo, and resource changes. They support cleanup callbacks, cancellation, async execution, post-await manual dependency tracking via track(), and configurable async concurrency behavior.

API reference: docs/api/effects.md

Resources

Resources model async derived state. They expose loading, ready, and error states, keep stale values while refreshing, and provide imperative controls such as refresh(), cancel(), and reset().

API reference: docs/api/resources.md

Stores

Stores isolate reactive graphs. The global APIs are convenience wrappers around a default global store, while createStore() lets you construct independent stores explicitly.

API reference: docs/api/store.md

Utilities

The shared runtime utilities cover batching, untracked reads, and queue primitives used by async effects and resources.

API reference: docs/api/utilities.md

For the full API documentation landing page, see docs/api/README.md.

License

MIT

See Also