@getanthill/mongodb-connector
v1.6.1
Published
MongoDB connector
Downloads
4,110
Keywords
Readme
@getanthill/mongodb-connector
forked from
chpr-mongodb
Installation
npm install @getanthill/mongodb-connectorUsage
This library supports both CommonJS and ESM (ES Modules) imports:
ESM (ES Modules)
import { MongoDbConnector, mongodb, ObjectId } from '@getanthill/mongodb-connector';
// or
import MongoDbConnector from '@getanthill/mongodb-connector';CommonJS
const { MongoDbConnector, mongodb, ObjectId } = require('@getanthill/mongodb-connector');
// or
const MongoDbConnector = require('@getanthill/mongodb-connector').default;Compatibility
- ✅ ESM Projects - Full support for ES Module imports
- ✅ CommonJS Projects - Full support for require() statements
- ✅ TypeScript - Includes TypeScript definitions
- ✅ Node.js 16+ - Compatible with modern Node.js versions
The library automatically provides the correct module format based on how it's imported.
