.jsdoc.hbs.md
<!--
DO NOT EDIT README.md DIRECTLY!
README.md is generated using the handlebars template at .readme.hbs.md (perhaps
this file).
-->
[![view on npm](http://img.shields.io/npm/v/mongodb-extended.svg)](https://www.npmjs.org/package/mongodb-extended)
[![npm module downloads](http://img.shields.io/npm/dt/mongodb-extended.svg)](https://www.npmjs.org/package/mongodb-extended)
[![Build Status](https://travis-ci.com/speedytwenty/mongodb-extended.svg?branch=master)](https://app.travis-ci.com/github/speedytwenty/mongodb-extended/builds)
[![Coverage Status](https://coveralls.io/repos/github/speedytwenty/mongodb-extended/badge.svg?branch=master)](https://coveralls.io/github/speedytwenty/mongodb-extended?branch=master)
[![Maintainability](https://codeclimate.com/github/speedytwenty/mongodb-extended/badges/gpa.svg)](https://codeclimate.com/github/speedytwenty/mongodb-extended/maintainability)
# MongoDB Extended (mongodb-extended)
Extends the Node.js driver adding a useful API for modeling MongoDB objects and
keeping database structures in sync across environments.
**Use case:**
When using MongoDB _without_ a tool like [Mongoose](https://mongoosejs.com/), it
can be burdensome and problematic to maintain indexes, schemas, etc. across
environments.
This module provides a mechanism for configuring your MongoDB collections in
code and keeping things in sync across multiple environments.
**MongoDB driver version:**
* **Version 1.x:** Supports mongodb driver version 3.x
* **Version 2.x:** Supports mongodb driver version 4.x
### Collection Configuration Management
With mongodb-extended, your application can configure each collection as necessary
and mongodb-extended will keep the database in sync with your configuration.
This includes:
* Keeping indexes in sync between the database and configuration.
* Keeping collection options in sync between the database and configuration.
* Dropping legacy indexes as denoted in configuration.
* Pre-populating a collection with documents.
## Installation
*With NPM:*
`npm i mongodb-extended`
*With Yarn:*
`yarn add mongodb-extended`
## API Reference
{{>main}}
## Support
Feel free to report a bug or open a feature request on [Github](https://github.com/speedytwenty/mongodb-extended).
## Testing
`npm i && npm test`
_Developed by [Chris Lee](https://github.com/speedytwenty). Sponsored by [CodeCatalysts](https://github.com/codecatalysts)._
_API reference generated with [jsdoc2md](https://github.com/jsdoc2md/jsdoc-to-markdown)._