# @pastash/filter_command

> Command Plugin for @pastash/pastash

Latest version **1.0.7** (published 2019-01-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install @pastash/filter_command
pnpm add @pastash/filter_command
yarn add @pastash/filter_command
bun add @pastash/filter_command
```

## 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.0.7 |
| Published | 2019-01-27 |
| First published | 2019-01-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lorenzo Mangani |
| Maintainers | lmangani |

## Links

- npm: https://www.npmjs.com/package/@pastash/filter_command
- npm.io page: https://npm.io/package/@pastash/filter_command

## Dependencies (1)

- [plugmein](https://npm.io/package/plugmein.md) ^1.1.3

## Recent versions

- 1.0.7 (latest) — 2019-01-27
- 1.0.6 — 2019-01-26
- 1.0.5 — 2019-01-26
- 1.0.4 — 2019-01-26
- 1.0.3 — 2019-01-26

## README

# PaStash Command Filter
This is an experimental filter executing a pipeline of commands against an array of objects, emitting results.


### Usage Example
Initialize the command filter and load any plugins. Point to the JSON field containing the data Array.
```
input {
  stdin{}
}

filter {
  json_fields {}
  command {
    debug => true
    field => message
    plugins => ['@pastash/command_chain']
    cmd => ".filter('eyes', 'brown').chain().groupBy('sex')"
  }
}

output {
  stdout {}
}

```
#### Pass it an Array
```
[{ "sex": "male", "age": 35, "eyes": "brown" },{ "sex": "female", "age": 38, "eyes": "brown" },{ "sex": "male", "age": 29, "eyes": "brown" }]
```

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