https://github.com/a51-dev/a51.memorio
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.3%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: a51-dev
- Language: TypeScript
- Default Branch: main
- Size: 330 KB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
.github/README.md
Memorio
A lightweight, type-safe state management library for JavaScript applications
Table of Contents
Features
- Reactive state management with observer pattern
- Persistent storage with Store API
- Session management for temporary data
- Type-safe with full TypeScript support
- Comprehensive test coverage
- Easy debugging with proxy-based state
Installation
bash
npm i -D memorio
All test suites are passing
- Basic functionality tests
- State management tests
- Store operations tests
- Cache operations tests
- Observer pattern tests
Total: 25 tests passed across 5 test suites
Quick Start
```javascript /* IMPORTANT! Add import only at first start of your SPA. Became global!. You don't need to import any time you need to use memorio */
import 'memorio';
// State Management state.counter = 0; state.active = false; state.name = "john"; state.user = { name: 'John', age: 30 }; state.hours = [2,3,10,23]
// Observer Pattern
// Example: if you change the state.counter you get a console.log
observer(
'state.counter',
(newValue, oldValue) => {
console.log(Counter changed from ${oldValue} to ${newValue});
}
);
// Store (Persistent Storage) store.set('preferences', { theme: 'dark' }); const preferences = store.get('preferences');
// Session Storage session.set('token', 'user-jwt-token'); const token = session.get('token'); ```
API Reference
State Management
State in Memorio is globally accessible and reactive:
```javascript // Setting state state.user = { name: 'John' };
// Getting state const userName = state.user.name;
// Listing all states console.log(state.list);
// Locking state (for Objects or Arrays) state.user.lock();
// Removing state state.remove('user');
// Clearing all states state.removeAll();
```
Observer Pattern
Observe state changes with React-like syntax:
```js
// Basic observer observer( 'state.user', (newValue, oldValue) => { console.log('User updated:', newValue); } );
```
- You can use in a function outside React
- In a javascript function
- in a setTimeout
```js
// With React useState const [user, setUser] = useState(); observer( 'state.user', () => { setUser(state.user); } );
// With React useEffect to avoid multiple observer after update useEffect( () => { observer( 'state.user', () => { setUser(state.user); } ); }, [] ); ```
Store
Persistent storage for your application:
```javascript // Setting values store.set('config', { theme: 'dark', language: 'en' });
// Getting values const config = store.get('config');
// Removing specific value store.remove('config');
// Getting store size const size = store.size();
// Clearing store store.removeAll(); ```
Session
Temporary storage that persists during page sessions:
```js // Setting session data session.set( 'userSession', { id: 'user123', lastActive: Date.now() } );
// Getting session data const userData = session.get('userSession');
// Checking session size const activeItems = session.size();
// Removing session data session.remove('userSession');
// Clearing all session data session.removeAll(); ```
Testing
Test suites are passing
- Basic functionality tests
- State management tests
- Store operations tests
- Cache operations tests
- Observer pattern tests
Total: 25 tests passed across 5 test suites
Security
Security scans and reports are available at:
License
MIT (c) Dario Passariello
Created with by Dario Passariello - Copyright (c) 2025
Owner
- Name: a51.dev
- Login: a51-dev
- Kind: organization
- Email: info@a51.dev
- Website: https://a51.dev
- Repositories: 1
- Profile: https://github.com/a51-dev
GitHub Events
Total
- Watch event: 1
- Delete event: 15
- Issue comment event: 6
- Public event: 1
- Push event: 9
- Pull request event: 16
- Create event: 10
Last Year
- Watch event: 1
- Delete event: 15
- Issue comment event: 6
- Public event: 1
- Push event: 9
- Pull request event: 16
- Create event: 10
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 31
- Average time to close issues: N/A
- Average time to close pull requests: about 23 hours
- Total issue authors: 0
- Total pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.87
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 17
Past Year
- Issues: 0
- Pull requests: 31
- Average time to close issues: N/A
- Average time to close pull requests: about 23 hours
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.87
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 17
Top Authors
Issue Authors
Pull Request Authors
- dependabot[bot] (17)
- passariello (14)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- npm 3,014 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 36
- Total maintainers: 1
npmjs.org: memorio
Memorio, State + Observer and Store for a easy life
- Homepage: https://a51.gitbook.io/memorio
- License: MIT
-
Latest release: 1.1.3
published 10 months ago
Rankings
Maintainers (1)
Funding
- url: https://www.patreon.com/passariello: type: patreon
Dependencies
- 506 dependencies
- @eslint/js 9.34.0 development
- @types/jest 30.0.0 development
- @types/node ^24.3.0 development
- @typescript-eslint/eslint-plugin 8.41.0 development
- @typescript-eslint/parser 8.41.0 development
- dphelper.types 0.0.19 development
- esbuild ^0.25.9 development
- esbuild-plugin-clean ^1.0.1 development
- esbuild-plugin-copy ^2.1.1 development
- eslint 9.34.0 development
- jest 30.0.5 development
- jest-environment-jsdom 30.0.5 development
- ts-jest 29.4.1 development
- ts-loader ^9.5.4 development
- ts-node 10.9.2 development
- tslib ^2.8.1 development
- typescript 5.9.2 development
- dphelper.types 0.0.19