# pire

> Pipe Request - make your request like a pipeline.

Latest version **0.4.0** (published 2020-10-22) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2020-10-22 |
| First published | 2020-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 58.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | pacexy |
| Maintainers | pacexy |
| Keywords | pacexy, pire, query, pipeline, request |

## Links

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

## 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

- 0.4.0 (latest) — 2020-10-22
- 0.3.0 — 2020-10-22
- 0.2.1 — 2020-10-21
- 0.2.0 — 2020-10-21
- 0.1.0 — 2020-10-17

## README

# pire
**Pi**pe **Re**quest - make your request like a pipeline.

## Example
> You can write the template string in `pir` file.

If you don't want a input, use `void`.

```typescript
import { parsep } from 'pire'

const pir = parsep(`
void -> riot.league {
  summonerName
  leaguePoints
  rank
  wins
  losses
} -> summonerId

summonerId -> riot.summoner {
  profileIconId
  summonerLevel
  extra {
    matchIds
  }
} -> extra.playerId

ID -> leaguepedia.player {
  ID
  Team
  Role
}
`)
```

It will be parsed as:
```
[
  {
    collectionPath: [ 'riot', 'league' ],
    projection: { summonerName: 1, leaguePoints: 1, rank: 1, wins: 1, losses: 1 },
    outputFieldPath: [ 'summonerId' ]
  },
  {
    inputFieldPath: [ 'summonerId' ],
    collectionPath: [ 'riot', 'summoner' ],
    projection: { profileIconId: 1, summonerLevel: 1, extra: { matchIds: 1 } },
    outputFieldPath: [ 'extra', 'playerId' ]
  },
  {
    inputFieldPath: [ 'ID' ],
    collectionPath: [ 'leaguepedia', 'player' ],
    projection: { ID: 1, Team: 1, Role: 1 }
  }
]
```

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