# mongoose-explain

> Log mongoose .explain() output for your mongoose .find() and .findOne() calls to the console

Latest version **0.2.2** (published 2018-10-29) · Apache 2.0 license · 0 weekly downloads

## Install

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

## 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.2.2 |
| Published | 2018-10-29 |
| First published | 2016-05-14 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4.0.0 |
| Dependencies | 1 |
| Unpacked size | 16.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Valeri Karpov |
| Maintainers | vkarpov15 |

## Links

- npm: https://www.npmjs.com/package/mongoose-explain
- Repository: https://github.com/vkarpov15/mongoose-explain
- Homepage: https://github.com/vkarpov15/mongoose-explain#readme
- Issues: https://github.com/vkarpov15/mongoose-explain/issues
- npm.io page: https://npm.io/package/mongoose-explain

## Dependencies (1)

- [lodash.get](https://npm.io/package/lodash.get.md) 4.4.2

## Recent versions

- 0.2.2 (latest) — 2018-10-29
- 0.2.1 — 2018-06-19
- 0.2.0 — 2017-11-09
- 0.1.1 — 2016-05-14
- 0.1.0 — 2016-05-14

## README

# mongoose-explain
Log mongoose `.explain()` output for your mongoose `.find()`, `.findOne()`, and `.aggregate()` calls to the console

## Example

```javascript
var mongoose = require('mongoose');
var explain = require('mongoose-explain');

var schema = new Schema({
  title: String,
  author: String,
  options: String
});

schema.plugin(explain);

var Author = mongoose.model('Author', schema, 'author');

// Logs `[{ queryPlanner: [Object], executionStats: [Object], serverInfo[Object] }]`
// on MongoDB 3.0.
// See https://docs.mongodb.com/manual/reference/explain-results/
Author.find({ title: 'Professional AngularJS' }, function(err, res) {});
```

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