@ghostjs/mongoose-explain
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

mongoose-explain

A mongoose plugin for logging .explain() output of queries

Installation

npm install --save @ghostjs/mongoose-explain

# OR

yarn add @ghostjs/mongoose-explain

Usage

import mongoose from 'mongoose';
import { explain } from '@ghostjs/mongoose-explain';

interface Data {
  someProp: string;
}

const schema = new mongoose.Schema<Data>({
  someProp: String,
});

schema.plugin(
  explain({
    // optional options...
  }),
);

Building

Run nx build mongoose-explain to build the library.

Running unit tests

Run nx test mongoose-explain to execute the unit tests via Jest.

License

This project is licensed under the MIT license, a copy of which can be found at LICENSE.

Package Sidebar

Install

npm i @ghostjs/mongoose-explain

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

8.01 kB

Total Files

10

Last publish

Collaborators

  • johannes.loher