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

solid-alien-signals

v0.2.1

Published

SolidJS style wrapper on alien-signals.

Readme

solid-alien-signals

A SolidJS-like API for alien-signals, providing familiar primitives such as batch, createEffect, createMemo, createResource, createSignal, and untrack.

Note:
Some methods in this package are direct aliases for primitives from alien-signals (such as createEffect and createMemo). Others, like batch, createResource, createSignal, and untrack, are wrappers or adapted implementations to provide a SolidJS-compatible API and behavior.

Features

  • SolidJS-compatible API: Use batch, createEffect, createMemo, createResource, createSignal, and untrack, similar to SolidJS.
  • Resource primitives: Use createResource for async data flows.
  • Type guards: Use isSignal and isEffect to identify reactive primitives.
  • TypeScript support: Fully typed API.

Installation

npm install solid-alien-signals

Usage

Basic Signals

import { createSignal, createEffect, createMemo } from 'solid-alien-signals';

const [count, setCount] = createSignal(1);

const double = createMemo(() => count() * 2);

createEffect(() => {
  console.log('Count is', count());
});

setCount(2); // Console: Count is 2
console.log(double()); // 4

// Setters also accept functions for updates based on previous value
setCount((prev) => prev + 1); // count is now 3

Batching Updates

Batch multiple state updates into a single re-computation:

import { batch, createSignal, createEffect } from 'solid-alien-signals';

const [a, setA] = createSignal(1);
const [b, setB] = createSignal(2);

createEffect(() => {
  console.log('Sum:', a() + b());
});

batch(() => {
  setA(3);
  setB(4);
});
// Console: Sum: 7 (only runs once)

Resources

Handle asynchronous data with createResource:

import { createResource } from 'solid-alien-signals';

const [user, { refetch }] = createResource(async () => fetch('/api/user').then((res) => res.json()));

console.log(user.loading); // true/false
console.log(user()); // user data or undefined

Untrack

Prevent dependency tracking inside a function:

import { createSignal, untrack } from 'solid-alien-signals';

const [count, setCount] = createSignal(0);

const value = untrack(() => count());
// `value` is read without tracking as a dependency

Type Guards

Check if a value is a signal or effect:

import { createSignal, createEffect, isSignal, isEffect } from 'solid-alien-signals';

const [count, setCount] = createSignal(0);
const effectFn = createEffect(() => console.log(count()));

console.log(isSignal(count)); // true
console.log(isSignal(setCount)); // true
console.log(isEffect(effectFn)); // true
console.log(isSignal(() => {})); // false

API Reference

batch(fn: () => void): void

Batches multiple updates into a single re-computation.

createEffect(fn: () => void): void

Runs a function whenever its dependencies change.

createMemo<T>(fn: () => T): () => T

Creates a memoized computation.

createRenderEffect(fn: () => void): void

Runs a function whenever its dependencies change.

createResource<T, S, R>(source, fetcher, options?): [Resource<T>, ResourceActions<T, R>]

Manages async data with loading/error states.

createSignal<T>(initialValue?: T): [() => T, (v: T | ((prev: T) => T)) => T]

Creates a reactive signal. The setter accepts either a value or a function that receives the previous value.

untrack<T>(fn: () => T): T

Runs a function without tracking dependencies.

isSignal(value: any): boolean

Returns true if the value is a signal (including signal getters, setters, memos, and resources).

isEffect(value: any): boolean

Returns true if the value is an effect function.

License

Portions of this code are adapted from alien-signals and SolidJS both MIT licensed.