{"maintainers":[{"name":"substack","email":"mail@substack.net"}],"keywords":["splice","stream","labels","mutable","pipeline"],"dist-tags":{"latest":"2.0.0"},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"description":"stream splicer with labels","readme":"# labeled-stream-splicer\n\n[stream splicer](https://npmjs.org/package/stream-splicer) with labels\n\n[![build status](https://secure.travis-ci.org/substack/labeled-stream-splicer.png)](http://travis-ci.org/substack/labeled-stream-splicer)\n\n# example\n\nHere's an example that exposes a label for `deps` and `pack`:\n\n``` js\nvar splicer = require('labeled-stream-splicer');\nvar through = require('through2');\nvar deps = require('module-deps');\nvar pack = require('browser-pack');\nvar lstream = require('lstream');\n\nvar pipeline = splicer.obj([\n    'deps', [ deps() ],\n    'pack', [ pack({ raw: true }) ]\n]);\n\npipeline.get('deps').unshift(lstream());\n\npipeline.get('deps').push(through.obj(function (row, enc, next) {\n    row.source = row.source.toUpperCase();\n    this.push(row);\n    next();\n}));\n\nprocess.stdin.pipe(pipeline).pipe(process.stdout);\n```\n\nHere the `deps` sub-pipeline is augmented with a post-transformation that\nuppercases its source input.\n\n# methods\n\n``` js\nvar splicer = require('labeled-stream-splicer')\n```\n\nThe API is the same as\n[stream-splicer](https://npmjs.org/package/stream-splicer),\nexcept that `pipeline.get()`, `pipeline.splice()`, and `pipeline.indexOf()` can\naccept string labels in addition to numeric indexes.\n\n## var pipeline = splicer(streams, opts)\n\nCreate a `pipeline` duplex stream given an array of `streams`. Each `stream`\nwill be piped to the next. Writes to `pipeline` get written to the first stream\nand data for reads from `pipeline` come from the last stream.\n\nTo signify a label, a stream may have a `.label` property or a string may be\nplaced in the `streams` array.\n\nFor example, for streams `[ a, 'foo', b, c, 'bar', d ]`, this pipeline is\nconstructed internally:\n\n```\na.pipe(b).pipe(c).pipe(d)\n```\n\nwith a label `'foo`' that points to `b` and a label `'bar'` that points to `d`.\nIf `a` or `c` has a `.label` property, that label would be used for addressing.\n\nInput will get written into `a`. Output will be read from `d`.\n\nIf any of the elements in `streams` are arrays, they will be converted into\nnested labeled pipelines. This is useful if you want to expose a hookable\npipeline with grouped insertion points.\n\n## var pipeline = splicer.obj(streams, opts)\n\nCreate a `pipeline` with `opts.objectMode` set to true for convenience.\n\n## var removed = pipeline.splice(index, howMany, stream, ...)\n\nSplice the pipeline starting at `index`, removing `howMany` streams and\nreplacing them with each additional `stream` argument provided.\n\nThe streams that were removed from the splice and returned.\n\n`index` can be an integer index or a label.\n\n## pipeline.push(stream, ...)\n\nPush one or more streams to the end of the pipeline.\n\nThe stream arguments may have a `label` property that will be used for string\nlookups.\n\n## var stream = pipeline.pop()\n\nPop a stream from the end of the pipeline.\n\n## pipeline.unshift(stream, ...)\n\nUnshift one or more streams to the begining of the pipeline.\n\nThe stream arguments may have a `label` property that will be used for string\nlookups.\n\n## var stream = pipeline.shift()\n\nShift a stream from the begining of the pipeline.\n\n## var stream = pipeline.get(index)\n\nReturn the stream at index `index`.\n\n`index` can be an integer or a string label.\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install labeled-stream-splicer\n```\n\n# license\n\nMIT\n","repository":{"type":"git","url":"git://github.com/substack/labeled-stream-splicer.git"},"users":{"dexteryy":true,"wenbing":true,"simplyianm":true,"s4g6":true,"seangenabe":true},"bugs":{"url":"https://github.com/substack/labeled-stream-splicer/issues"},"license":"MIT","versions":{"1.0.0":{"name":"labeled-stream-splicer","version":"1.0.0","description":"stream splicer with labels","main":"index.js","dependencies":{"inherits":"^2.0.1","isarray":"~0.0.1","stream-splicer":"^1.1.0"},"devDependencies":{"tape":"^2.12.1","browser-pack":"^2.0.1","concat-stream":"^1.4.6","module-deps":"^2.1.2","through2":"^1.0.0"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/labeled-stream-splicer.git"},"homepage":"https://github.com/substack/labeled-stream-splicer","keywords":["splice","stream","labels","mutable","pipeline"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/15","firefox/latest","firefox/nightly","chrome/15","chrome/latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"bugs":{"url":"https://github.com/substack/labeled-stream-splicer/issues"},"_id":"labeled-stream-splicer@1.0.0","dist":{"shasum":"cb1282bc2d8e9a4bfb3bcda184e8f017deea7c1d","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/labeled-stream-splicer/-/labeled-stream-splicer-1.0.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.0.1":{"name":"labeled-stream-splicer","version":"1.0.1","description":"stream splicer with labels","main":"index.js","dependencies":{"inherits":"^2.0.1","isarray":"~0.0.1","stream-splicer":"^1.1.0"},"devDependencies":{"tape":"^2.12.1","browser-pack":"^2.0.1","concat-stream":"^1.4.6","module-deps":"^2.1.2","through2":"^1.0.0"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/labeled-stream-splicer.git"},"homepage":"https://github.com/substack/labeled-stream-splicer","keywords":["splice","stream","labels","mutable","pipeline"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/15","firefox/latest","firefox/nightly","chrome/15","chrome/latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"gitHead":"081c6ccb63c20a03ce5f4ebfa5f57c132bbdc289","bugs":{"url":"https://github.com/substack/labeled-stream-splicer/issues"},"_id":"labeled-stream-splicer@1.0.1","_shasum":"3272b3716a5bc5abc6eb1eebc3e591a26cde5d02","_from":".","_npmVersion":"2.1.3","_nodeVersion":"0.10.31","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"dist":{"shasum":"3272b3716a5bc5abc6eb1eebc3e591a26cde5d02","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/labeled-stream-splicer/-/labeled-stream-splicer-1.0.1.tgz"},"directories":{}},"1.0.2":{"name":"labeled-stream-splicer","version":"1.0.2","description":"stream splicer with labels","main":"index.js","dependencies":{"inherits":"^2.0.1","isarray":"~0.0.1","stream-splicer":"^1.1.0"},"devDependencies":{"tape":"^2.12.1","browser-pack":"^2.0.1","concat-stream":"^1.4.6","module-deps":"^2.1.2","through2":"^1.0.0"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/labeled-stream-splicer.git"},"homepage":"https://github.com/substack/labeled-stream-splicer","keywords":["splice","stream","labels","mutable","pipeline"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/15","firefox/latest","firefox/nightly","chrome/15","chrome/latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"gitHead":"efb6b5e2eefc5d6642358c67c8f40ffa241fa55e","bugs":{"url":"https://github.com/substack/labeled-stream-splicer/issues"},"_id":"labeled-stream-splicer@1.0.2","_shasum":"4615331537784981e8fd264e1f3a434c4e0ddd65","_from":".","_npmVersion":"2.1.3","_nodeVersion":"0.10.31","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"dist":{"shasum":"4615331537784981e8fd264e1f3a434c4e0ddd65","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/labeled-stream-splicer/-/labeled-stream-splicer-1.0.2.tgz"},"directories":{}},"2.0.0":{"name":"labeled-stream-splicer","version":"2.0.0","description":"stream splicer with labels","main":"index.js","dependencies":{"inherits":"^2.0.1","isarray":"~0.0.1","stream-splicer":"^2.0.0"},"devDependencies":{"tape":"^2.12.1","browser-pack":"^2.0.1","concat-stream":"^1.4.6","module-deps":"^2.1.2","through2":"^1.0.0"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/labeled-stream-splicer.git"},"homepage":"https://github.com/substack/labeled-stream-splicer","keywords":["splice","stream","labels","mutable","pipeline"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","gitHead":"a52780b45be32fc8e398dc6a1957299603e30a12","bugs":{"url":"https://github.com/substack/labeled-stream-splicer/issues"},"_id":"labeled-stream-splicer@2.0.0","_shasum":"a52e1d138024c00b86b1c0c91f677918b8ae0a59","_from":".","_npmVersion":"3.2.2","_nodeVersion":"2.4.0","_npmUser":{"name":"substack","email":"substack@gmail.com"},"dist":{"shasum":"a52e1d138024c00b86b1c0c91f677918b8ae0a59","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}}},"name":"labeled-stream-splicer","time":{"modified":"2016-12-30T04:13:15.761Z","created":"2014-06-11T05:30:11.011Z","1.0.0":"2014-06-11T05:30:11.011Z","1.0.1":"2014-11-18T03:23:39.464Z","1.0.2":"2014-11-18T05:05:43.452Z","2.0.0":"2015-08-24T05:06:13.314Z"},"readmeFilename":"readme.markdown","homepage":"https://github.com/substack/labeled-stream-splicer"}