@flibbert/meerkat
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

Meerkat · npm version

Library to simplify working with mongodb aggregation framework.

Installation

npm:

npm i @flibert/meerkat

yarn:

yarn add @flibert/meerkat

Usage:

import { paginate, match, sort } from '@flibbert/meerkat';

db.getCollection('subscriptions').aggregate([
  ...match({
    status: 'active',
  }),
  ...sort({
    createdAt: -1,
  }),
  ...paginate({
    skip: 0,
    limit: 100,
  }),
]);

See tests for more examples.

Readme

Keywords

none

Package Sidebar

Install

npm i @flibbert/meerkat

Weekly Downloads

5

Version

0.1.4

License

none

Unpacked Size

14.3 kB

Total Files

6

Last publish

Collaborators

  • karaxuna