UNPKG

mabnadb

Version:

"MabnaDB" is a powerful TypeScript library designed for seamless data storage, retrieval, and management. Drawing inspiration from the efficiency of some well-known offline databases, MabnaDB offers a developer-friendly experience for handling data in you

67 lines (47 loc) 2.75 kB
## MabnaDB ![](https://33333.cdn.cke-cs.com/kSW7V9NHUXugvhoQeFaf/images/db60e41f65a10ecb8d46715c15c8235fa7f6979f1bd03150.png) **Description:**  **"MabnaDB"** is a powerful TypeScript library designed for seamless data storage, retrieval, and management. Drawing inspiration from the efficiency of some well-known offline databases, **MabnaDB** offers a developer-friendly experience for handling data in your applications. Whether you are building web, mobile, or server applications, **MabnaDB** simplifies the process of working with data, providing a robust and flexible storage solution. **Slogan:** “Empower Your Data with MabnaDB Effortless Storage, Seamless Retrieval.” --- **Installation:** ```plaintext npm install mabnadb ``` --- **Simple Usage:** ```typescript // src/example.ts import MabnaDB from './MabnaDB'; const db = new MabnaDB(); db.put({ _id: '1', name: 'John' }); const result = db.get('1'); console.log(result); ``` --- ### **Key Types:** | Type | Description | | --- | --- | | **MabnaDBDocument** | Represents a database document with a mandatory **\_id** field and optional attachments. | | **MabnaDBAttachment** | Represents an attachment associated with a document, consisting of a name and data. | | **MabnaDBIndex** | Represents an index on a specified field, with an optional unique flag. | | **MabnaDBChangeEvent** | Represents a change event with information about the operation and the affected document. | | **MabnaDBTask** | Represents a background task with an ID, type, status, and optional result. | | **MabnaDBSettings** | Contains settings for the database, including an optional debug mode. | | **MabnaDBPlugin** | Represents a plugin that can be applied to the database. | --- ### **Key Features and Methods:** | Feature - Method | Description | | --- | --- | | **Constructor** | Represents a database document with a mandatory **\_id** field and optional attachments. | | **CRUD Operations** |   | | **Indexing**  |   | | **Replication and Synchronization** |   | | **Attachments**  |   | | **Map-Reduce Views** |   | | **Database Information** / **getDatabaseInfo** |   | | **Utility Methods** |   | | **Event Handling** |   | _**This class serves as a foundation for an in-memory database with extensibility through plugins and various features for managing data, attachments, indexes, replication, and more.**_ ### **Keywords:** #TypeScript\_Database #Data\_Storage #PouchDB\_Alternative #NoSQL #Lightweight #Seamless\_Integration #Developer\_Friendly #Cross\_Platform #TypeScript\_Library #Web\_Development #Mobile\_Development #Server\_Applications #Efficient\_Data\_Management #JSON\_Documents