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

@zenwolf/kanso

v0.0.1

Published

Light-weight, unidirectional, state-management library.

Readme

Kanso

Kanso is a light-weight state-management library for web applications. Kanso's philosophy is to provide simple mechanics that can be used at your own discretion. You can use these patterns in many ways. Kanso molds to the skill of the user.

"By removing the non-essential and ornate, we can express a bare and honest simplicity."

Install

npm install --save @zenwolf/kanso

Overview

Encapsulated state

Kanso focuses on encapsulating state and logic, separating them from any UI layer. State is maintained in a single place and can be passed into another system for processing or rendering.

Kanso shapes the world: something else can render it into the visible realm.

No Defined UI layer

Kanso defines no specific UI, allowing you to use any UI technology you like. Your UI of choice will need to accept the entire state and use it as it sees fit. The UI will need to be able to create actions and dispatch them on the app object using the App#dispatch method.

Core concepts

  1. Unidirectional data flow that operates solely on actions/commands.
  2. Immutable state managed by state data stores.
  3. Interceptors to extend the core system:
    • action interceptors -- allow you to act upon an action or change the action/replace it before it is passed to stores and used to modify state.
    • state interceptors -- allow you to act upon a new state before it is set, or change it/replace it, before change listeners are called.
  4. Standard way to define state queries using QueryApi generator, which can be used statelessly(static methods) or statefully(bound to a specific state snapshot).

Responding to changes

Kanso gives you different ways to respond to changes:

  1. Intercept actions.
  2. Listen to state changes.

Interceptors

Interceptors are all composed into a single function call. The intial value is passed as the argument, and each function returns the same value type that is passed as the arugment to the next interceptor, until you end up with a single, resulting value which is then processed by the application.

Action Interceptors

An action interceptor is a function that allows you to receive an action before it is used to change state. The required function signature is:

action => action

You can return the same action, you could return a different action, or you could return a modified version of the same action. This is an extremely flexible system, hopefully allowing you to perform any number of things in response to an action.

State Interceptors

A state interceptor is a function that allows you to receive a new state before it is set. The required function signature is:

state => state

Much like an action interceptor, you can return the same state, return a different state, or return a modified version of the same state.

UI Strategies

Here are some strategies related to working with UI.

Build

Code generation

Kanso is written in ES6 and uses Babel to generate ES5 JS code. You run a build command to generate the resulting library from src into the lib folder.

npm run build

Code linting

Kanso uses eslint to lint code.

npm run lint

Run tests

Kanso uses mocha for unit tests.

npm test

Run verification (lint + test)

npm run verify