# then-mongo

> Promise based mongo driver built on mongojs

Latest version **3.1.0** (published 2019-01-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install then-mongo
pnpm add then-mongo
yarn add then-mongo
bun add then-mongo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2019-01-23 |
| First published | 2015-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 98.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | ForbesLindesay |
| Maintainers | forbeslindesay, then-bot |
| Keywords | mongo, mongodb, promise |

## Links

- npm: https://www.npmjs.com/package/then-mongo
- Repository: https://github.com/then/then-mongo
- Homepage: https://github.com/then/then-mongo#readme
- Issues: https://github.com/then/then-mongo/issues
- npm.io page: https://npm.io/package/then-mongo

## Dependencies (5)

- [mongojs](https://npm.io/package/mongojs.md) ^2.6.0
- [promise](https://npm.io/package/promise.md) ^8.0.0
- [@types/mongodb](https://npm.io/package/@types/mongodb.md) ^2.2.7
- [@types/promise](https://npm.io/package/@types/promise.md) ^7.1.30
- [@databases/with-container](https://npm.io/package/@databases/with-container.md) ^0.0.1

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 3.1.0 (latest) — 2019-01-23
- 3.0.2 — 2017-10-18
- 3.0.1 — 2017-07-11
- 3.0.0 — 2017-07-11
- 2.3.2 — 2016-06-03
- 2.3.1 — 2016-05-28
- 2.1.0 — 2016-01-14
- 2.0.2 — 2015-12-19
- 2.0.1 — 2015-12-18
- 2.0.0 — 2015-12-18

## README

# then-mongo

Promise based mongo driver built on mongojs

[![Build Status](https://img.shields.io/travis/then/then-mongo/master.svg)](https://travis-ci.org/then/then-mongo)
[![Dependency Status](https://img.shields.io/david/then/then-mongo.svg)](https://david-dm.org/then/then-mongo)
[![NPM version](https://img.shields.io/npm/v/then-mongo.svg)](https://www.npmjs.com/package/then-mongo)

## Installation

    npm install then-mongo

## Usage

Emulates the [offical mongo api](https://docs.mongodb.org/manual/reference/method/) as far as is possible, except that the result of every operation is a promise, rather than being synchronous.

```js
var mongo = require('then-mongo');
var db = mongo('connection-string', ['collectionA', 'collectionB']);

db.collectionA.find().skip(5).limit(10)
  .done(function (results) {
    console.dir(results);
  });
```

## API

Exports a function `connect(connectionString, collections?, options?)` and returns an instance of [Database](docs/database.md).  If you pass in a list of collection names, then you can access each [Collection](docs/collection.md) as a property of the [Database](docs/database.md) instance.

## License

  MIT

---
_Source: https://npm.io/package/then-mongo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
