Generate MongoDB pipelines with ease. Save dozens of keystrokes.
- Faster overviews
- pipeline validation
- lightweight library
- 100 % test coverage
$ npm install mongodb-pipeline-factory --save
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
)]
)
Julian Claus and contributors.
MIT