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

stateflow-manager

v1.0.0

Published

simple state manager for small projects

Readme

StateFlow - альтернатива Redux для маленьких личных проектов. Экономит оперативную память пользователя, позволяет избавить архитектуру и структуру кода от огромных сторов, редюсеров, и экшенов, привносимых Redux. Крайне не рекомендуется использовать в крупных проектах - ограничение на хранение памяти в каждом сторе 10 МБ.

Установка npm install @your-namespace/state Использование import State from '@your-namespace/state';

const state = new State();

// Сохраняем состояние в локальное хранилище state.permanentStorage('myState', { count: 0 });

// Сохраняем состояние в сеансовое хранилище state.temporaryStorage('myState', { count: 0 });

// Получаем состояние из хранилища const myState = state.getItemFromStorage('myState'); console.log(myState); // { count: 0 } Методы permanentStorage(stateName, initialStateValue) Сохраняет состояние в локальное хранилище.

stateName - название состояния, которое будет использоваться в качестве ключа при сохранении в локальное хранилище. initialStateValue - начальное значение состояния, которое будет сохранено в локальное хранилище при первом вызове метода. temporaryStorage(stateName, initialStateValue) Сохраняет состояние в сеансовое хранилище.

stateName - название состояния, которое будет использоваться в качестве ключа при сохранении в сеансовое хранилище. initialStateValue - начальное значение состояния, которое будет сохранено в сеансовое хранилище при первом вызове метода. getItemFromStorage(stateName) Получает состояние из хранилища.

stateName - название состояния, которое будет использоваться в качестве ключа при получении из локального или сеансового хранилища. Метод getItemFromStorage(stateName) возвращает сохраненное состояние из локального или сеансового хранилища в зависимости от того, где оно было сохранено. Если состояние не было найдено в локальном и сеансовом хранилищах, метод вернет null.

Примечание Обратите внимание, что сохранение больших объемов данных в локальное или сеансовое хранилище может привести к снижению производительности вашего приложения, а также к превышению лимитов хранилища.

StateFlow is an alternative to Redux for small personal projects. It saves the user's memory, allows you to get rid of the architecture and code structure of huge stores, reducers, and actions that Redux introduces. It is highly not recommended for use in large projects - there is a limit of 10 MB of memory storage in each store.

Installation

npm install @your-namespace/state

Usage

import State from '@your-namespace/state';

const state = new State();

// Save state to local storage state.permanentStorage('myState', { count: 0 });

// Save state to session storage state.temporaryStorage('myState', { count: 0 });

// Get state from storage const myState = state.getItemFromStorage('myState'); console.log(myState); // { count: 0 } Methods permanentStorage(stateName, initialStateValue) Saves the state to local storage.

stateName - the name of the state that will be used as a key when saving to local storage. initialStateValue - the initial value of the state that will be saved to local storage on the first call of the method. temporaryStorage(stateName, initialStateValue) Saves the state to session storage.

stateName - the name of the state that will be used as a key when saving to session storage. initialStateValue - the initial value of the state that will be saved to session storage on the first call of the method. getItemFromStorage(stateName) Retrieves the state from storage.

stateName - the name of the state that will be used as a key when retrieving from local or session storage. The getItemFromStorage(stateName) method returns the saved state from the local or session storage depending on where it was saved. If the state was not found in the local and session storage, the method returns null.

Note Note that saving large amounts of data to local or session storage can degrade the performance of your application as well as exceed the limits of the storage.