npm.mongo is a beginner-friendly MongoDB wrapper for Node.js, designed as a key-value store with an API similar to quick.db. Version 3.0.8 (stable) provides asynchronous operations, dot notation support, and multiple model support. It simplifies MongoDB for novices but lacks TypeScript types, has limited community traction, and is primarily used in Discord bot development. Compared to Mongoose or native MongoDB driver, it sacrifices flexibility for simplicity.
npm install npm.mongoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to connect to MongoDB, set a key-value pair, and retrieve it asynchronously using the Database class.
Pass a valid MongoDB URI string to new Database(uri).
Use await or .then() on methods like set(), get(), push(), add().
Use require() instead of import.
Consider using the original quick.db or mongodb driver for better maintenance.
Run npm install npm.mongo and ensure the require path is 'npm.mongo'.
Provide a valid MongoDB connection string: const db = new Database('mongodb://localhost:27017/mydb');Ensure you have const { Database } = require('npm.mongo'); and const db = new Database(uri);