tap-lexer

1.0.3 • Public • Published

tap-lexer

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

Install

npm install tap-lexer

Usage

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")

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    12
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    12
  • 1.0.2
    2
  • 1.0.1
    1
  • 1.0.0
    2

Package Sidebar

Install

npm i tap-lexer

Weekly Downloads

8

Version

1.0.3

License

CC0-1.0

Last publish

Collaborators

  • m59