# tap-lexer

> Receives a stream of TAP lines and emits JS objects of types and values.

Latest version **1.0.3** (published 2017-02-09) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install tap-lexer
pnpm add tap-lexer
yarn add tap-lexer
bun add tap-lexer
```

Provides the command `tap-lexer`.

## 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.3 |
| Published | 2017-02-09 |
| First published | 2016-07-07 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Johnny Hauser |
| Maintainers | m59 |
| Keywords | tap, lexer, lexing, token |

## Links

- npm: https://www.npmjs.com/package/tap-lexer
- Repository: https://github.com/m59peacemaker/node-tap-lexer
- Homepage: https://github.com/m59peacemaker/node-tap-lexer#readme
- Issues: https://github.com/m59peacemaker/node-tap-lexer/issues
- npm.io page: https://npm.io/package/tap-lexer

## Dependencies (3)

- [split2](https://npm.io/package/split2.md) ^2.1.0
- [duplexer](https://npm.io/package/duplexer.md) 0.1.1
- [through2](https://npm.io/package/through2.md) ^2.0.1

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 1.0.3 (latest) — 2017-02-09
- 1.0.2 — 2016-07-09
- 1.0.1 — 2016-07-07
- 1.0.0 — 2016-07-07

## README

# tap-lexer

Receives a stream of TAP lines and emits JS objects of types and values.

## Install

```sh
npm install tap-lexer
```

## Usage

```js
const tapLexer = require('tap-lexer')
const through  = require('through2')

process.stdin // stream that emits TAP
  .pipe(tapLexer())
  .pipe(though.obj(function (chunk, enc, cb) { // objectMode stream
    // `chunk` is a TAP token object
  }))

process.stdin
  .pipe(tapLexer())
  .on('data', token => {})

```

- `token: object`
  - `type:  string, unknown`
    - version
    - plan
    - test
    - bailout
    - diagnostic
    - yaml
    - unknown
  - `value: string` the value of the input associated with a type (the "plan" line if type is "plan")

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