mongodb-aggregation-builder
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

mongodb-aggregation-builder

Note: This project is forked and a continuation of mongo-pipeline-builder. highly recommeded to check that out. Few Addons are being built upon the existing codebase


mongodb-aggregation-builder is a aggregation builder for the db.collection.aggregate method and db.aggregate method.

  • Simplify aggregations by making them more readable
  • Aggregations are easier to edit.
  • Aggregations are testable on a dataset.
  • Aggregation stages appear in an array.
  • Sequential stages for documents

npm package

npm i -S mongodb-aggregation-builder

Usage:

Using require()

const AggregationBuilder = require("mongodb-aggregation-builder").AggregationBuilder;
const { EqualityPayload, OnlyPayload, Field } = require('mongodb-aggregation-builder/helpers');
const { LessThanEqual, ArrayElemAt, Equal, Expression } = require('mongodb-aggregation-builder/operators');

Using import

import { AggregationBuilder } from 'mongodb-aggregation-builder';
import { EqualityPayload, OnlyPayload, Field } from 'mongodb-aggregation-builder/helpers';
import { LessThanEqual, ArrayElemAt, Equal, Expression } from 'mongodb-pipeline-builder/operators';

Package Sidebar

Install

npm i mongodb-aggregation-builder

Weekly Downloads

2

Version

1.0.9

License

MIT

Unpacked Size

240 kB

Total Files

314

Last publish

Collaborators

  • smithg09