# plugmein

> Pluggable object transformer utility based on Aggro

Latest version **1.1.3** (published 2019-01-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install plugmein
pnpm add plugmein
yarn add plugmein
bun add plugmein
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2019-01-26 |
| First published | 2019-01-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 54.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Lorenzo Mangani |
| Maintainers | lmangani |
| Keywords | nest, data, aggregate, query, transform, plugin, collection |

## Links

- npm: https://www.npmjs.com/package/plugmein
- Repository: https://github.com/lmangani/plugmein
- Homepage: https://github.com/lmangani/plugmein#readme
- Issues: https://github.com/lmangani/plugmein/issues
- npm.io page: https://npm.io/package/plugmein

## Dependencies (1)

- [zephyr](https://npm.io/package/zephyr.md) ^1.3.6

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2019-01-26
- 1.1.2 — 2019-01-25

## README

# PlugMeIn

PlugMeIn is an extended and pluggable version of [Aggro](https://github.com/borgar/aggro), a very basic utility to filter and sort a collection of items for use in reports or visualizations.

## Usage
```
const plugMeIn = require('plugmein');
const population = [
  { "method": "INVITE", "count": 35, "response": "407" },
  { "method": "REGISTER", "count": 38, "response": "407" },
  { "method": "INVITE", "count": 29, "response": "200" },
  { "method": "REGISTER", "count": 19, "response": "200" },
  { "method": "INVITE", "count": 31, "response": "200" },
  { "method": "REGISTER", "count": 22, "response": "200" },
  { "method": "INVITE", "count": 22, "response": "200" },
  { "method": "OPTIONS", "count": 33, "response": "486" }
];

plugMeIn()
  .filter('method', 'INVITE')
  .groupBy('response')


```

## Plug Functions
PlugMeIn supports function injection from local or remote (npm) modules
#### Module Export
```
module.exports = function plugin() {
  this.chain = function() {
    // return this to allow chaining on this function
    return this;
  }
}
```

### Module Import
```javascript
// Initialize
var plugmein = require('plugmein');

// Re-Initialize w/ Plugins
plugmein = plugmein().plug([ require('my-npm-module'), require('./my-local-module').myFunc ]);

plugmein().myFunc()

```


###### Why Forking?
This version will be heavily modified to work within [paStash](https://github.com/sipcapture/pastash). Assuming we don't drift too far off, we'll propose changes back to Aggro whenever mature.

---
_Source: https://npm.io/package/plugmein · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
