mongodb-pipeline-factory
v0.23.2
Published
Generate MongoDB pipelines with ease. Save dozens of keystrokes.
Downloads
6
Maintainers
Readme
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