Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 3.58 KB

README.md

File metadata and controls

27 lines (23 loc) · 3.58 KB

dexie-opened-databases-addon

An addon for Dexie.js that keeps track of opened connections

Build Status npm downloads npm version node version GitHub license GitHub issues Known Vulnerabilities Dependency Status DevDependency Status Maintainability Test Coverage Codacy Score code style: prettier minified size minzipped size Language grade: JavaScript Total alerts DeepScan grade

How it works

When a new Dexie is instanciated ie new Dexie(dbName, { addons: [ DexieOpenedDatabasesAddon ] }).open(), this instance is kept as Dexie.openedDatabases, in a Map with the database name as key.

When the connection is closed ie db.close(), its instance is removed from the Dexie.openedDatabases Map.