{"name":"minipass-pipeline","version":"1.2.2","description":"create a pipeline of streams using Minipass","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --follow-tags"},"tap":{"check-coverage":true},"devDependencies":{"tap":"^14.6.4"},"dependencies":{"minipass":"^3.0.0"},"engines":{"node":">=8"},"gitHead":"c1b660ea62856d8bbd909618f5a3c3d51e29e69b","_id":"minipass-pipeline@1.2.2","_nodeVersion":"12.8.1","_npmVersion":"6.12.0-next.0","dist":{"integrity":"sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA==","shasum":"3dcb6bb4a546e32969c7ad710f2c79a86abba93a","tarball":"http://registry-npm.ywwl.com/minipass-pipeline/download/minipass-pipeline-1.2.2.tgz","fileCount":4,"unpackedSize":6952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkmYQCRA9TVsSAnZWagAAJO4P/AxUe+dSUOGU3W2z4B27\nrPsqbbBXE33FWf0QfzV7gsxxtBmFCGQYqxBU4zsH60h0OjDF49HDkyxBXJTm\nRJ65IR0G7bcqMjWPEWfdXg0IuFfJlR0NzExf4CCu3aoAn8gB0KBlcAq4tSQ5\nNZhy3CGxPHj5AskhaxTXjHuM8m8EwBxfubJUOJMY0F9Xw9RZjDCvdunNVgGq\nNAJDKO0T2vLH8C8+rRNc5tzEna6x9GEtVwDfAo2bh9+e7OPuuENP8oYnQ6pQ\nWKTvFLfwCv97AWHckV3w6NopHPEvntHDh4TKvtNF9/PoVyuw72CAEYzuq/K+\nIlBmifE7ePbsAjDo8xDh7bxIrsK9oDDbRTXjdoDydIpnpSpeJCgWLSLSn4Pi\ntYfvxByQJbod1mQlMjewvGmmFyYAIS9fWT9CY/H3BBmjp4KWYA2kLMfMU3MV\nD9hD/hBVTvmmZmVghQct+4zibu0s2aN3S2kUoGZyNi46zb7bCzdGCzN9/Ddw\n+7o+rICSp/SssjfNyR76XxjJ5h4Qs5kSr9hAOdzeduG74SR0vAFyABZhp8+g\njcB0A2bR+SL7qT5pGfDnbxs/oFDbGUTkjJmK5xKzijQCoJXOUznrpown5tKL\nMSyI597JfS7Rq5M6Da4ZFAP1IN4lCLIcPLmR5B0ODjIzkP3fqFX7dRF6ysOO\nhiTf\r\n=sVdr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG34Wdnc38OYZlvoVF0mdynVmQkGEVtoUFtnDlwT+dbQAiA65yl1ldXk/7mFDS5L2+u84rWS1WBvnOewrE1vXiACUg=="}],"size":2976,"noattachment":false,"key":"/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minipass-pipeline_1.2.2_1569875472039_0.7006548968085411"},"_hasShrinkwrap":false,"readme":"# minipass-pipeline\n\nCreate a pipeline of streams using Minipass.\n\nCalls `.pipe()` on all the streams in the list.  Returns a stream where\nwrites got to the first pipe in the chain, and reads are from the last.\n\nErrors are proxied along the chain and emitted on the Pipeline stream.\n\n## USAGE\n\n```js\nconst Pipeline = require('minipass-pipeline')\n\n// the list of streams to pipeline together,\n// a bit like `input | transform | output` in bash\nconst p = new Pipeline(input, transform, output)\n\np.write('foo') // writes to input\np.on('data', chunk => doSomething()) // reads from output stream\n\n// less contrived example (but still pretty contrived)...\nconst decode = new bunzipDecoder()\nconst unpack = tar.extract({ cwd: 'target-dir' })\nconst tbz = new Pipeline(decode, unpack)\n\nfs.createReadStream('archive.tbz').pipe(tbz)\n\n// specify any minipass options if you like, as the first argument\n// it'll only try to pipeline event emitters with a .pipe() method\nconst p = new Pipeline({ objectMode: true }, input, transform, output)\n\n// If you don't know the things to pipe in right away, that's fine.\n// use p.push(stream) to add to the end, or p.unshift(stream) to the front\nconst databaseDecoderStreamDoohickey = (connectionInfo) => {\n  const p = new Pipeline()\n  logIntoDatabase(connectionInfo).then(connection => {\n    initializeDecoderRing(connectionInfo).then(decoderRing => {\n      p.push(connection, decoderRing)\n      getUpstreamSource(upstream => {\n        p.unshift(upstream)\n      })\n    })\n  })\n  // return to caller right away\n  // emitted data will be upstream -> connection -> decoderRing pipeline\n  return p\n}\n```\n\nPipeline is a [minipass](http://npm.im/minipass) stream, so it's as\nsynchronous as the streams it wraps.  It will buffer data until there is a\nreader, but no longer, so make sure to attach your listeners before you\npipe it somewhere else.\n\n## `new Pipeline(opts = {}, ...streams)`\n\nCreate a new Pipeline with the specified Minipass options and any streams\nprovided.\n\n## `pipeline.push(stream, ...)`\n\nAttach one or more streams to the pipeline at the end (read) side of the\npipe chain.\n\n## `pipeline.unshift(stream, ...)`\n\nAttach one or more streams to the pipeline at the start (write) side of the\npipe chain.\n","publish_time":1569875472189,"_cnpm_publish_time":1569875472189,"dist-tags":{"latest":"3.0.1"}}