# mongoose-when

> jquery style .when(promise, promise) support for mongoose

Latest version **0.0.1** (published 2013-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install mongoose-when
pnpm add mongoose-when
yarn add mongoose-when
bun add mongoose-when
```

## 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.1 |
| Published | 2013-04-16 |
| First published | 2013-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Will Shaver |
| Maintainers | wshaver |
| Keywords | mongoose, when, promise, plugin, mongodb, jquery |

## Links

- npm: https://www.npmjs.com/package/mongoose-when
- Repository: https://github.com/wshaver/mongoose-when
- npm.io page: https://npm.io/package/mongoose-when

## 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
- [@temporal-architect/claude-plugin](https://npm.io/package/@temporal-architect/claude-plugin.md) — 335 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2013-04-16

## README

mongoose-when
============

Add jquery style .when support to mongoose promise object. Requires mongoose v3.6.1 or higher, no other requirements.

Use exactly like jquery.when on which this code is based. http://api.jquery.com/jQuery.when/

Promise.when() returns a Mongoose promise object.

```javascript
var mongoose = require('mongoose');
var Promise = mongoose.Promise;

var p1 = Users.find();
var p2 = Animals.find();
Promise.when(p1, p2).addBack(function(err, users, animals) {
  //etc
});
```

See unit tests for for more usage examples.

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