Skip to content

edgardleal/aggregatets

Repository files navigation

Welcome to aggregatets 👋

Version License: MIT Build Status

Mongo like aggregations on arrays

Install

yarn add aggregatets

or using npm

npm i aggregatets

Basic Usage

import aggregate from 'aggregatets'

const list = [{ name: 'test', value: 10 }, { name: 'jhon', value: 32 }, { name: 'Ester', value: 150 }]

const result = aggregate(list, [
  {
    $project: {
      name: 1
    }
  }
])

console.log(result)
// [ {name: 'test', }, { name: 'jhon' }, { name: 'Ester' }]

Development

to update or improve this project

Setup

yarn install

Run

make

Run tests

make test

Features

  • $match
    • $match with regex
  • $project
  • $group
  • $lookup
  • $sort

Author

👤 ** edgardleal **

Show your support

Give a ⭐️ if this project helped you!

Buy Me A Coffee


This README was generated with ❤️ by readme-md-generator