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

synapse-storage

v3.0.19

Published

Набор инструментов для управления состоянием и апи-запросами

Readme

Synapse Storage

🇺🇸 English | 🇷🇺 Русский | 📝 ChangeLog

State management toolkit + API client

npm version Bundle Size TypeScript RxJS Version

✨ Key Features

  • 🚀 Framework Agnostic - You can use Synapse with any framework or independently
  • 💾 Various Storage Adapters - Memory, LocalStorage, IndexedDB
  • 🧮 Different Ways to Access Data - Computed values with memoization
    • Ability to create Redux-style computed selectors
    • Ability to directly subscribe to specific properties in storage
    • Ability to subscribe to reactive state
  • 🌐 API Client Creation - HTTP client with caching capabilities (Similar to RTK Query)
  • ⚛️ React - Several convenient hooks for React
  • RxJS - Ability to create Redux-Observable style effects
  • ⚙️ Custom Middleware Support - Ability to extend storage functionality with custom middlewares
  • 🔌 Custom Plugin Support - Ability to extend storage functionality with custom plugins

Author

Vladislav — Senior Frontend Developer (React, TypeScript)

🔎 Currently looking for new career opportunities!

GitHub | LinkedIn


PS: Not recommended for production use yet as I develop this in my free time. The library works in general, but I can provide guarantees only after full integration into my pet project - Social Network. This won't happen before changing my current workplace and country of residence

📦 Installation

npm install synapse-storage
# For reactive capabilities
npm install rxjs

# For React integration  
npm install react react-dom

# All at once for full functionality
npm install synapse-storage rxjs react react-dom

| Module | Description | Dependencies | |--------|-------------|--------------| | synapse-storage/core | base | - | | synapse-storage/react | React | React 18+ | | synapse-storage/reactive | RxJS | RxJS 7.8.2+ | | synapse-storage/api | HTTP client | - | | synapse-storage/utils | Utils | - |

💡 Tip: Import only the modules you need for optimal bundle size

tsconfig.json:

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ES2022", 
    "moduleResolution": "bundler"
  }
}

📚 Documentation

🎯 Examples


📊 Why Synapse Storage?

One library instead of many - Synapse combines functionality that usually requires multiple dependencies:

| What you get | Traditional approach | Synapse Storage | |--------------|---------------------|---------| | State Management | Redux + RTK (~45KB) | ✅ | | HTTP Client + Caching | React Query (~39KB) | ✅| | Reactive Effects | Redux-Observable (~25KB) | ✅| | Storage Adapters | Custom solutions | ✅| | React Integration | Custom hooks | ✅| | Computed Selectors | Reselect (~5KB) | ✅| | Middleware System | Custom implementation | ✅| | Plugin Architecture | Custom implementation | ✅|

Bundle Size Comparison

// Traditional stack
import { configureStore } from '@reduxjs/toolkit'     // ~45KB
import { createApi } from '@reduxjs/toolkit/query'    // included in RTK
import { QueryClient } from '@tanstack/react-query'  // ~39KB  
import { createEpicMiddleware } from 'redux-observable' // ~25KB
// Total: ~109KB + custom implementations

// Synapse Storage
import { createSynapse } from 'synapse-storage'       // ~171KB
// Total: 171KB with ALL features included

Modular Usage

Don't need everything? Import only what you use:

| Use Case | Import | Size | Comparison | |-------------------|------------------------|------|---------------------------| | Basic state | synapse-storage/core | ~42KB | vs Redux: 45KB | | + HTTP client | + /api | +13KB | vs React Query: 39KB | | + Reactive | + /reactive | +8KB | vs Redux-Observable: 25KB | | + React hooks | + /react | +5KB | vs Custom hooks | | Full package | all modules | ~171KB |vs 109KB stack + custom |

🎯 Result: Similar or better performance with unified API and TypeScript support out of the box

🧩 Modular Architecture "Like a Constructor"

Use only what you need - each module works independently:

🎯 Flexible Usage Scenarios

// 📦 Minimal project - storage only
import { MemoryStorage } from 'synapse-storage/core'

// 📦 + Add HTTP client when needed  
import { ApiClient } from 'synapse-storage/api'

// 📦 + Add reactive effects when required
import { createDispatcher } from 'synapse-storage/reactive'

// 📦 + Add React hooks for UI
import { useSelector } from 'synapse-storage/react'

🔧 Or Create Your Own Implementation

// Use core + your solutions
import { IStorage } from 'synapse-storage/core'

// Implement your HTTP client
class MyApiClient { /* your logic */ }

// Implement your React hooks  
const useMyCustomHook = () => { /* your logic */ }

// Combine as convenient!

🎨 Constructor Approach Benefits

  • 🚀 Quick Start - begin with core, add modules as project grows
  • 📦 Optimal Bundle - don't pay for unused functionality
  • 🔄 Flexibility - replace any module with your implementation
  • 🛠️ Compatibility - modules work independently but integrate perfectly
  • 📈 Scalability - from simple state to full-featured architecture

💡 Evolution Example: Started with MemoryStorage → added ApiClient → connected reactive effects → integrated React hooks. Each step is optional!