Socket
Socket
Sign inDemoInstall

maggregation-stage-builder

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    maggregation-stage-builder

Build query for mongodb using a class instance.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
8.82 kB
Created
Weekly downloads
 

Readme

Source

Maggregation Stage Builder

What this class seeks is to simplify the way to create the queries in Mongo, chaining each method, and only receiving parameters, to avoid having a super long pipeline string.

How to usage

$ npm install maggregation-stage-builder

// Import the module
const MSB = require('maggregation-stage-builder')

// Init the instance
let _PIPE_ = new MSB();

// Simple example for a lookup
_PIPE_.lookup('books', '_id', 'author', 'authorOfTheBook');

Therefore it works with the current Mongo documentation

Keywords

FAQs

Last updated on 27 Nov 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc