{"name":"minipass-pipeline","version":"1.1.0","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":"^2.5.1"},"gitHead":"655ccde17a437b5c81fcb88da2719486bd72a647","_id":"minipass-pipeline@1.1.0","_nodeVersion":"12.8.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-Ncdxts5EuJ6FJP1Suw/Ja4zSIRKco7dSmWEwCe5EBN622AsdO2tZaAyaaDN2jdRGXl5XalD7Va8PilFU6RcakA==","shasum":"e083f770eeb72c91f1a01cdb4583600fa0e13a5a","tarball":"http://registry-npm.ywwl.com/minipass-pipeline/download/minipass-pipeline-1.1.0.tgz","fileCount":4,"unpackedSize":6012,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdf8ahCRA9TVsSAnZWagAA4HUP+gOZB1JxnTVczJOCMLce\nOaMLYERu5Qa2GPwu0P2pPd4KWDwu8RbNl7e5iSvRdoJznEL8iyZEDrCPf9i/\nMBP20LJSTkURY+Xk/tESgoYzoktq/vQXDxziFaOqmAGOw/uetc+uQbCjTy0S\nRhhlkZ9gENKeZo1JhVwfW912DTgkRYfC+rOTQRJhpa4+Y5bfQyQbsZiAgwni\n/M8ma8vhG3r/1M7MH97fF23fUWMyAJvXHmPH4kBBvfSKSeGfxXFtM78npPsJ\njJA3ZVi+irCwial6xShznylMbAoH/rs0IUaseIoI75v8WuV0LsN3/8AiTkon\nqf8Z5R7RPOxr1/j9Iwb+hSaS85CpQ3ueuTYQdMtHOOmG6Mu9cKNXE58J4VNs\nIAVB7R2eQlhngMBpyNeeYNCS3sXEjgygg801MJ2GiY5LQShlC+85g0Sk+guI\nAWu3zNJ1V5jZLb9o0vbI20n9KeYb6er1BPgqK2XmwsouAvJjzumOe6byDaH2\n2vBt+ERDAKJ6poIG1LOgi+po2EKtHvewuoxuOJg5oRk69iyh9HfLx1t/3jZk\nvzJ6FVyc9ie9RWKfI7wS9JHNnGc33cLpNFwxIEkhXFCAtlvi2ui7E1swEo8p\nho/T6gcMX5AzcaUiPrE2sjWd/dZWKjCgnuqg+9yBttZEliepYURu9FBFvwmH\n1Vhb\r\n=ghcl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMMEFwNJgBZDxAt45MpOgEfoeQppk5LPc3+2s03oOS4wIhAMh4mGNryePoeBKpBH1TQ1ZeM8fj1p4+8Kcmrb4aJUeD"}],"size":2685,"noattachment":false,"key":"/minipass-pipeline/-/minipass-pipeline-1.1.0.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.1.0_1568655008365_0.6314883608636239"},"_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":1568655008487,"_cnpm_publish_time":1568655008487,"dist-tags":{"latest":"3.0.1"}}