mongodb-pipeline-factory
TypeScript icon, indicating that this package has built-in type declarations

0.23.2 • Public • Published

mongodb-pipeline-factory

Generate MongoDB pipelines with ease. Save dozens of keystrokes.

Features

  • Faster overviews
  • pipeline validation
  • lightweight library
  • 100 % test coverage

Installation

$ npm install mongodb-pipeline-factory --save

Usage

Import the stages or operators you need first.

import { cond, gt, project } from 'mongodb-pipeline-factory'

Now build your first pipeline.

project(
  ['item', 1],
  ['discount', cond(
    gt('$quantity', 250),
    30,
    20
  )]
)

Author

Julian Claus and contributors.

License

MIT

/mongodb-pipeline-factory/

    Package Sidebar

    Install

    npm i mongodb-pipeline-factory

    Weekly Downloads

    37

    Version

    0.23.2

    License

    MIT

    Unpacked Size

    151 kB

    Total Files

    46

    Last publish

    Collaborators

    • dhjd9m