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 🙏

© 2025 – Pkg Stats / Ryan Hefner

fenix-store

v1.0.3

Published

A simple and powerful state management library for JavaScript applications

Downloads

10

Readme

Fenix Store

Lightweight • Reactive • Zero Dependencies • TypeScript

A tiny but powerful state management library for JavaScript applications. It provides a reactive API to manage the state of your application.

CI/CD Pipeline Bundle Size TypeScript Test Coverage

Why?

After some years dealing with other complex solutions I decided to create this library with the following principles:

  • Reactive: It allows you to subscribe to changes in the state of your application.
  • Simple: It's designed to be simple and easy to use.
  • Flexible: It allows you to create side effects and middleware to apply and listen to changes.
  • Lightweight: It's small (1.8kb gzipped), with no dependencies.
  • Type-Safe: Full TypeScript support with strict type checking.

Installation

Install with npm:

  npm install fenix-store

or with yarn:

  yarn add fenix-store

Usage

import { FenixStore } from 'fenix-store';

const store = FenixStore.create();
console.log(store.get());
// {}

store.on('user.name').set('John Doe');

console.log(store.on('user.name').get());
// 'John Doe'

console.log(store.get());
// { user: { name: 'John Doe' } }

Subscribe / Unsubscribe:

...

const unsubscribe = store
  .on('user.name')
  .subscribe(console.log);

store
  .on('user.name')
  .set('John Doe'); // 'John Doe'

unsubscribe();

store
  .on('user.name')
  .set('Jane Doe'); // nothing

Side Effects / Middleware

...

store
  .effects
  .use(
    // Return an object with the 'next' property to change the value, otherwise no changes will be applied.
    (path, next) => {
      if (path !== 'user.name') return;

      return { next: `Hello, ${next}` };
    },
  )

store
  .on('user.name')
  .subscribe(console.log);

store
  .on('user.name')
  .set('John Doe');
  // 'Hello, John Doe'

store
  .on('user.name')
  .set('Jane Doe');
  // 'Hello, Jane Doe'
...

const changeStack = [];

store
  .effects
  .use(
    (path, next, previous) => {
      changeStack.push({
        path,
        next,
        previous,
      });
    },
  );

store
  .on('user.name')
  .set('John Doe');

store
  .on('user.name')
  .set('Jane Doe');

console.log(changeStack.at(-1));
// { path: 'user.name', next: 'Jane Doe', previous: 'John Doe' }

🔧 Development

Quick Start

# Install dependencies
pnpm install

# Run tests in watch mode
pnpm dev

# Build the library
pnpm build

Quality Assurance

  • ✅ TypeScript strict type checking
  • ✅ ESLint code quality analysis
  • ✅ Comprehensive test coverage
  • ✅ Bundle size monitoring
  • ✅ Security vulnerability scanning

CI/CD Pipeline

The project uses GitHub Actions for:

  • Continuous Integration: Automated testing on code pushes (Node.js 18, 20, 21)
  • Bundle Monitoring: Size tracking and analysis
  • Quality Gates: Code quality and security checks
  • Release Automation: Streamlined publishing with bundle metrics

🤝 Contributing

This library is designed to be lightweight and focused, but contributions are welcome!

Quick Start

pnpm install && pnpm dev    # Install deps + run tests in watch mode

Before Submitting a PR

  • Ensure tests pass: pnpm test
  • Check bundle size impact: pnpm size:check
  • Keep changes focused and well-documented

The CI pipeline will automatically validate code quality, run tests across multiple Node.js versions, and provide bundle size feedback.


📈 Project Status

This project follows a stability-first approach with careful consideration for changes to maintain its lightweight nature and zero-dependency philosophy.

  • Bundle Size: 1.8KB gzipped (target: <3KB) ✅
  • Test Coverage: Comprehensive test suite ✅
  • TypeScript: Strict mode with full type safety ✅
  • Dependencies: Zero runtime dependencies ✅
  • CI/CD: Fully automated quality pipeline ✅

License: MIT