How chessurisme/reign works
Reign is a small browser-side IndexedDB wrapper. A consumer supplies database and store configuration, initializes a connection, then uses the Reign API for record operations and closes the connection. Constructor validation and store normalization support initialization; CRUD methods obtain object stores through the transaction helper. The README also documents existence checks and clearing. The graph reflects sampled runtime code and documented APIs; IndexedDB’s internal persistence behavior is represented at the browser boundary.
Main entry points: index.js Reign API · create-transaction.js Transaction helper · verify-parameters.js Parameter validation · store-configurations.js Store normalization
Components 6
Public API
- Reign API
src/index.js
Configuration
- Parameter validation
src/verify-parameters.js - Store normalization
src/store-configurations.js
Data operations
- Transaction helper
src/create-transaction.js
Browser storage
- IndexedDB
Other components
- Application
Connections 8
- Application → Reign API: calls API
- Reign API → Parameter validation: validates options
- Reign API → Store normalization: normalizes stores
- Reign API → IndexedDB: opens and upgrades
- Reign API → Transaction helper: requests store
- Transaction helper → IndexedDB: creates transaction
- Reign API → IndexedDB: reads and writes
- Reign API → IndexedDB: closes connection