{"name":"@tapjs/tap-finished","version":"0.0.2","description":"detect when tap output is finished","main":"index.js","dependencies":{"tap-parser":"^0.2.1","through":"^2.3.8"},"devDependencies":{"auto-changelog":"^2.4.0","npmignore":"^0.3.0","tap":"^0.4.13","tape":"^5.6.1"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"","test":"tap test/*.js"},"testling":{"files":"test/*.js","browsers":["ie/8","ie/9","firefox/latest","chrome/latest","safari/latest","opera/latest"]},"repository":{"type":"git","url":"git://github.com/tapjs/tap-finished.git"},"homepage":"https://github.com/tapjs/tap-finished","keywords":["tap","parse","stream","complete","test"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"gitHead":"2bdd5d5eab0a1c6b11867bee9af48b82c47a53ef","bugs":{"url":"https://github.com/tapjs/tap-finished/issues"},"_id":"@tapjs/tap-finished@0.0.2","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-H8dEIcLoCvGFRW601fQDnEeQj9TMbtzUo1jRxUw3ey0yD0dOeThTKnoyWboPuGtcUvfTpAgS4ElcWkQcKocuXQ==","shasum":"07b2ab5b55183e0124185746003958d7fabafe68","tarball":"http://registry-npm.ywwl.com/@tapjs/tap-finished/download/@tapjs/tap-finished-0.0.2.tgz","fileCount":13,"unpackedSize":14862,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHvGmExhqZDzMuiV+Z81zPXpIiSUbFtyre1EUEr+WqPhAiEAvM8egrJFHUSC+byk6qTBnu/OUMREJtSNMZvpvQv0HEQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLO9OACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCeA/7Bfn6QCgbjaQ1/NMkYdL6zG80Y0ZUX4QgabXmpuCxJgAiSSas\r\nu9RQsxtjEEhJIUavfxrpC0VwRh0PFmirm8MVrZZCi8VI0XS8YtFUPvXH1irK\r\nQardoj1qAqKQTUOOixdaDge7mksnkUJq1CYRb38Ci2kL/VG1ALQ5Mu9ovQsO\r\nv+uodJzWKFeHG7RNO/q4cYMS1EOET0le8XGZikH1SfAe0xknoXmOvns9K52U\r\n1/Malrp4ZQEFaECtT3n7pYQEkcsXrdID8mTYYt9TLq+c5WWlo9+DnFa34PvG\r\n1mvKLnjqvWNBSTDMUuaW+ryCVnVR8PfcpueZAwhmSsA3F+s4XgNKU3/2a8++\r\nBxYFWc9yM60cxBiGbX7oThjRCYyxL5lc938N63OJ7k/7UW+2P+lrnr1JvxTg\r\ndFGnFUPft3kkL8JHKWc3AYnY37ocam6/94cQ7LuKTHJxEboaHw1f1OW1p9ZR\r\nVcIk2yJLdIGDK+EXu22H3tjPbYi78WBhe7WunAod1bhB5KHaQW0YznJzSe4D\r\nChuprswpUVQnJi/hx4+bsdtizyeUf67arrGSfXIvbNPyEUc4ex5QzdxUvdI8\r\nHwCzUtCT+zhq3/VMXz1ZkRtzphXWapvCENiWdzhBUavQHiqETUN9HUzY5FU9\r\nokf/gkXeZ+kxXPbedpCNZBpZ3xeGXETixH8=\r\n=Clzx\r\n-----END PGP SIGNATURE-----\r\n","size":4903,"noattachment":false,"key":"/@tapjs/tap-finished/-/@tapjs/tap-finished-0.0.2.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tap-finished_0.0.2_1663889230597_0.6753868801198746"},"_hasShrinkwrap":false,"readme":"# tap-finished\n\ndetect when [tap output](http://testanything.org) is finished\n\n[![build status](https://secure.travis-ci.org/tapjs/tap-finished.png)](http://travis-ci.org/tapjs/tap-finished)\n\n[![browser support](http://ci.testling.com/tapjs/tap-finished.png)](http://ci.testling.com/tapjs/tap-finished)\n\nNormally with [tap-parser](https://github.com/tapjs/tap-parser) the\n`'results'` event fires only after the stream is closed. This module lets you\ndetect whether a stream seems closed without waiting for the `'end'` event.\n\n# example\n\nGiven this tap output in `tap_output.txt`:\n\n```\nTAP version 13\n# wait\nok 1 (unnamed assert)\nnot ok 2 should be equal\n  ---\n    operator: equal\n    expected: 5\n    actual:   4\n  ...\n\n1..2\n# tests 2\n# pass  1\n# fail  1\n```\n\nand given this script that pipes stdin into the finished stream:\n\n``` js\nvar finished = require('tap-finished');\nvar stream = finished(function (results) {\n    console.dir(results);\n});\nprocess.stdin.pipe(stream);\n```\n\nWe'll use `cat` to create a stream that contains the tap output but doesn't end\nand then pipe that to the script:\n\n```\n$ cat tap_output.txt /dev/stdin | node stream.js\n{ ok: false,\n  asserts:\n   [ { ok: true, number: 1, name: '(unnamed assert)' },\n     { ok: false, number: 2, name: 'should be equal' } ],\n  pass: [ { ok: true, number: 1, name: '(unnamed assert)' } ],\n  fail: [ { ok: false, number: 2, name: 'should be equal' } ],\n  errors: [],\n  plan: { start: 1, end: 2 } }\n^C\n```\n\nEven though the `'end'` message never came, we still got the parsed results.\nYay!\n\n# methods\n\n``` js\nvar finished = require('tap-finished')\n```\n\n## var ws = finished(opts={}, cb)\n\nReturn a writable stream `ws` that consumes tap input.\n`cb(results)` fires with the `results` from\n[tap-parser](https://github.com/tapjs/tap-parser)\nwhen the stream seems finished or when the `'end'` event occurs.\n\n`opts.wait` controls how long to wait in milliseconds for more input before\nfiring the `cb` if the `'end'` event doesn't fire.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install tap-finished\n```\n\nYou can use this module in the browser with [browserify](http://browserify.org).\n\n# license\n\nMIT\n","publish_time":1663889230829,"_cnpm_publish_time":1663889230829,"dist-tags":{"latest":"0.0.3"}}