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

litsy

v0.5.0

Published

litsy is a minimal node web data state machine

Readme

LitsyLogo

litsy is a minimal simple state manager and local dataStore for modern node apps.

Introduction

litsy was created to battle 2 hours worth of boilerplate redux-saga, redux, actions code, reducers code etc. Most modern day node.js applications really only need a few things like a way to set data and share data with the rest of the app or to listen to when data changes and do something with it. Litsy makes all of this a painless process. The basic model is as follows:

Set a function call on state change > Set a StateName/State pair > Trigger all function calls > In function call, update local states as necessary

litsy also allows you to specify if you'd like a certain dataStore to be persistent (useful for saving web-app auth tokens or loginState etc.) or non-persistent (useful for keeping track of current app state which should be let go after a user leaves the app).

Getting Started

To get going with litsy, start by installing it as a dependency:

$ yarn add litsy or $ npm i litsy

Once you've installed the dependency, you can get started with whatever you want. litsy's main reason for existence is to simplify the process of sharing data between different parts of an application whilst simultaneously allowing any objects dependent on certain data to be notified of a change. litsy makes all of this super simple.

Create a store

Much like redux, litsy saves information in stores of data. A store is typically responsible for an entire application at once although you can always access other stores to have cross-package communications. To create a store, you need to import the Store class and create a new Store.

import { Store } from 'litsy'
...
let myStore = new Store({
    storeName: "awesome_app",
    persist: true 
});

Subscribe/Unsubscribe to a stateName

Subscribe:

A stateName is the name assigned to a state you would like to watch the contents of. One example of organizing stateNames is by assigning names relative to the content you expect in any given state such as

stateName: "data.profile_section.user_name"
value: "John Doe"

The way to subscribe to a stateName (even before you have instantiated the stateName along with the respective state) is as follows:

myStore.subscribe(stateName, subscriberName, callBackFn);

Where a callBackFn is applied to a subscriberName. When the state associated with the stateName is changed, all subscribers get notice of a stateChange having occurred. At this point you can re-render a react-component, feed some new data, whatever you want to do. An example would be:

myStore.subscribe("data.profile_section.user_name", "usernameLabel", () => {
	this.forceUpdate.bind(this);
};

It is possible to have the same subscriber subscribed to multiple states and it's also possible for multiple subscribers to be subscribed to the same state. Keep in mind that any subscriberEvents should not depend on one another to function.

Unsubscribe:

to unsubscribe, simply just

myStore.unsubscribe(stateName, subscriberName);

Setting/Getting a stateName and value pair

Setting:

Setting a stateName and value pair can be done using

myStore.setState(stateName, value);

setting a state always notifies subscribers and saves the state to either localStorage (if data is persistent) or sessionStorage (in the case that the store is a non-persistent store).

Getting:

getting a state is easy as well, all you have to do is

let result = myStore.getState(stateName);

Cross-package communication (currently in the works)