# then-mongodb

> Use Promise/A+ with mongo!

Latest version **0.0.2** (published 2014-11-13) · Apache 2.0 license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2014-11-13 |
| First published | 2014-11-13 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kouga |
| Maintainers | ncwhale |
| Keywords | mongo, mongodb, Promises/A+, promises-aplus, promise |

## Links

- npm: https://www.npmjs.com/package/then-mongodb
- Repository: https://github.com/ncwhale/then-mongodb
- Issues: https://github.com/ncwhale/then-mongodb/issues
- npm.io page: https://npm.io/package/then-mongodb

## Dependencies (3)

- [when](https://npm.io/package/when.md) ^3.6.0
- [debug](https://npm.io/package/debug.md) ^2.1.0
- [mongodb-core](https://npm.io/package/mongodb-core.md) ~1.0

## 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

- 0.0.2 (latest) — 2014-11-13
- 0.0.1 — 2014-11-13

## README

<a href="https://promisesaplus.com/">
    <img src="https://promisesaplus.com/assets/logo-small.png" alt="Promises/A+ logo"
         title="Promises/A+ 1.0 compliant" align="right" style="width:64px;" />
</a>

# then-mongodb

Let's use Promise/A+ to mongo driver!

Based on mongodb-core and when, to create a simple but easy to use interface for mongo.

And a simple auto-loadable model layer for easy app use.

**Most UPDATES are in develop branch, the master branch will be merged until function test done.**

This Project is still under **DEVELOP! DO NOT USE IT** until it get released!

Any suggest are welcome.

# Modules

## Mongodb object map

MongoDB | Map | This Module
------: | :-: | :----------
Server | 1:1 | Server
Collection | 1:1 | Model
Document | 1:1 | Entity

## Server

Server is the base connection object to mongodb.

Any Operation with server need NameSpace, Operation as raw mode.

## Model

Model with two function:

1. A model class which just bind collection NS;
2. A model loader which can (auto)load your models;

Before model promise do anything, they need a server to do it.

Any Operation with Model mapped to Collection.

## Entity

Entity was made by model:

1. New made by model(or just a object warped)
2. Find from a model(like find from collection)

Any Operation with Entity mapped to Document.

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