Skip to content

A lightweight, intelligent storage library for JavaScript that makes state persistence as easy as modifying an object.

License

Notifications You must be signed in to change notification settings

54145a/145Storage2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

145 Storage 2

My localStorage is a Javascript Object :)

A lightweight, intelligent storage library for JavaScript that makes state persistence as easy as modifying an object.

✨ Features

  • ⚡ Auto-Persistence: Seamlessly syncs object changes to storage (LocalStorage, etc.) without manual save calls.
  • 🛡️ Built-in Debouncing: Rapid changes (e.g., typing in an input) are automatically batched to prevent excessive I/O operations.
  • 🔍 Deep Proxying: Automatically tracks changes in nested objects and arrays, ensuring every level of your data is reactive.
  • 🧩 Modular Adapters(upcoming): Designed to support multiple storage backends (LocalStorage, File, IndexedDB, etc.).

🚀 Usage

<script type="importmap">
    {
        "imports": {
            "145-storage-2/": "./node_modules/145-storage-2/"
        }
    }
</script>
import { StorageHelper } from "145-storage-2/storage.js";
const storage = new StorageHelper();
const settings = await storage.getStorage("settings", StorageHelper.ADAPTORS.LOCAL_STORAGE);
settings.count = settings.count ? settings.count + 1 : 1;
console.info("Count: ", Ssettings.count);

This project is still in development and should't be used in production.

🗺 Roadmap

  • LocalStorage
  • Raw file
  • Indexed DB
  • SQL
  • First Release

About

A lightweight, intelligent storage library for JavaScript that makes state persistence as easy as modifying an object.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published