{"_id":"sandwich-stream","_rev":"4106769","name":"sandwich-stream","description":"A readable stream that concatenates multiple streams with optional head, tail & join buffers","dist-tags":{"latest":"2.0.2"},"maintainers":[{"name":"connrs","email":""}],"time":{"modified":"2026-01-11T18:56:29.000Z","created":"2013-08-30T22:51:28.404Z","2.0.2":"2018-10-31T07:21:00.780Z","2.0.1":"2018-10-30T00:20:36.840Z","2.0.0":"2018-10-22T12:11:42.737Z","1.0.0":"2015-08-09T07:28:08.705Z","0.0.4":"2013-08-31T12:14:23.446Z","0.0.3":"2013-08-30T23:23:46.361Z","0.0.2":"2013-08-30T23:11:32.012Z","0.0.1":"2013-08-30T22:51:28.404Z"},"users":{},"author":{"name":"connrs","url":"https://connrs.uk/"},"repository":{"type":"git","url":"git+https://github.com/connrs/node-sandwich-stream.git"},"versions":{"2.0.2":{"name":"sandwich-stream","version":"2.0.2","description":"A readable stream that concatenates multiple streams with optional head, tail & join buffers","license":"Apache-2.0","engines":{"node":">= 0.10"},"repository":{"type":"git","url":"git+https://github.com/connrs/node-sandwich-stream.git"},"main":"dist/sandwich-stream","module":"dist/sandwich-stream.mjs","types":"dist/sandwich-stream.d.ts","keywords":["stream","sandwich","readable","typescript","concatenation"],"scripts":{"rollup:build":"rollup -c","rollup:watch":"npm run rollup:build -- --watch","build":"npm run rollup:build","test":"snyk test && npm run jest","docs":"typedoc --out ./docs/ ./src/","lint":"tslint --config tslint.json --project .","jest":"jest --config jest.config.json --ci --runInBand --detectOpenHandles --forceExit --no-cache"},"licenses":[{"type":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.txt"}],"author":{"name":"connrs","url":"https://connrs.uk/"},"contributors":[{"name":"Fazendaaa","email":"lucas.carotta@outlook.com","url":"http://fazendaaa.me/"}],"dependencies":{},"devDependencies":{"@types/jest":"^23.3.5","@types/node":"^10.12.0","codecov":"^3.1.0","husky":"^1.1.2","jest":"^23.6.0","rollup":"^0.66.6","rollup-plugin-typescript2":"^0.17.2","snyk":"^1.104.1","ts-jest":"^23.10.4","ts-node":"^7.0.1","tslint":"^5.11.0","tslint-microsoft-contrib":"^5.2.1","typedoc":"^0.13.0","typescript":"^3.1.4"},"husky":{"hooks":{"pre-push":"npm run build && npm test","pre-commit":"npm run lint && npm run docs"}},"gitHead":"d7d530f77839dc4d7e7a6015d5d89f19d834cfd6","bugs":{"url":"https://github.com/connrs/node-sandwich-stream/issues"},"homepage":"https://github.com/connrs/node-sandwich-stream#readme","_id":"sandwich-stream@2.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"connrs","email":"paul.connolley@gmail.com"},"dist":{"shasum":"6d1feb6cf7e9fe9fadb41513459a72c2e84000fa","size":5562,"noattachment":false,"key":"/sandwich-stream/-/sandwich-stream-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sandwich-stream/download/sandwich-stream-2.0.2.tgz"},"maintainers":[{"name":"connrs","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sandwich-stream_2.0.2_1540970460606_0.8099829377865122"},"_hasShrinkwrap":false,"publish_time":1540970460780,"_cnpm_publish_time":1540970460780,"_cnpmcore_publish_time":"2021-12-17T00:56:56.712Z"},"2.0.1":{"engines":{"node":">= 0.10"},"name":"sandwich-stream","description":"A readable stream that concatenates multiple streams with optional head, tail & join buffers","version":"2.0.1","repository":{"type":"git","url":"git+https://github.com/connrs/node-sandwich-stream.git"},"main":"./dist/sandwich-stream.js","types":"./dist/sandwich-stream.d.ts","keywords":["stream","sandwich","readable","typescript","concatenation"],"scripts":{"build":"webpack","test":"snyk test && npm run jest","docs":"typedoc --out ./docs/ ./src/","lint":"tslint --config tslint.json --project .","jest":"jest --config jest.config.json --ci --runInBand --detectOpenHandles --forceExit --no-cache"},"licenses":[{"type":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.txt"}],"author":{"name":"connrs","url":"https://connrs.uk/"},"contributors":[{"name":"Fazendaaa","email":"lucas.carotta@outlook.com","url":"http://fazendaaa.me/"}],"dependencies":{},"devDependencies":{"@types/jest":"^23.3.5","@types/node":"^10.12.0","codecov":"^3.1.0","husky":"^1.1.2","jest":"^23.6.0","snyk":"^1.104.1","ts-jest":"^23.10.4","ts-loader":"^5.2.2","ts-node":"^7.0.1","tslint":"^5.11.0","tslint-microsoft-contrib":"^5.2.1","typedoc":"^0.13.0","typescript":"^3.1.3","webpack":"^4.21.0","webpack-cli":"^3.1.2"},"husky":{"hooks":{"pre-push":"npm run build && npm test","pre-commit":"npm run lint && npm run docs"}},"gitHead":"90dbc8ccac73dd7ca8aab94dbeca3d0893581bcb","bugs":{"url":"https://github.com/connrs/node-sandwich-stream/issues"},"homepage":"https://github.com/connrs/node-sandwich-stream#readme","_id":"sandwich-stream@2.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"connrs","email":"paul.connolley@gmail.com"},"dist":{"shasum":"71606fd182ec07ac41ecaf963f82eb6718aaf765","size":5933,"noattachment":false,"key":"/sandwich-stream/-/sandwich-stream-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sandwich-stream/download/sandwich-stream-2.0.1.tgz"},"maintainers":[{"name":"connrs","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sandwich-stream_2.0.1_1540858836671_0.3744065023952732"},"_hasShrinkwrap":false,"publish_time":1540858836840,"deprecated":"Use sandwich-stream@2.0.2 instead. Build issue occurred with Webpack. New version will use Rollup","_cnpm_publish_time":1540858836840,"_cnpmcore_publish_time":"2021-12-17T00:56:56.977Z"},"2.0.0":{"engines":{"node":">= 0.10"},"name":"sandwich-stream","description":"A readable stream that concatenates multiple streams with optional head, tail & join buffers","version":"2.0.0","repository":{"type":"git","url":"git+https://github.com/connrs/node-sandwich-stream.git"},"main":"./dist/sandwich-stream.js","types":"./dist/sandwich-stream.d.ts","keywords":["stream","sandwich","readable","typescript","concatenation"],"scripts":{"build":"webpack","test":"snyk test && npm run jest","docs":"typedoc --out ./docs/ ./src/","lint":"tslint --config tslint.json --project .","jest":"jest --config jest.config.json --ci --runInBand --detectOpenHandles --forceExit --no-cache"},"licenses":[{"type":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.txt"}],"author":{"name":"connrs","url":"https://connrs.uk/"},"contributors":[{"name":"Fazendaaa","email":"lucas.carotta@outlook.com","url":"http://fazendaaa.me/"}],"dependencies":{},"devDependencies":{"@types/jest":"^23.3.5","@types/node":"^10.12.0","codecov":"^3.1.0","husky":"^1.1.2","jest":"^23.6.0","snyk":"^1.104.1","ts-jest":"^23.10.4","ts-loader":"^5.2.2","ts-node":"^7.0.1","tslint":"^5.11.0","tslint-microsoft-contrib":"^5.2.1","typedoc":"^0.13.0","typescript":"^3.1.3","webpack":"^4.21.0","webpack-cli":"^3.1.2"},"husky":{"hooks":{"pre-push":"npm run build && npm test","pre-commit":"npm run lint && npm run docs"}},"gitHead":"aac798adf9f7f15220ae8b6203176b8438c8365e","bugs":{"url":"https://github.com/connrs/node-sandwich-stream/issues"},"homepage":"https://github.com/connrs/node-sandwich-stream#readme","_id":"sandwich-stream@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"connrs","email":"paul.connolley@gmail.com"},"dist":{"shasum":"44ba113517a865013809a4e939d69101309e65b0","size":5908,"noattachment":false,"key":"/sandwich-stream/-/sandwich-stream-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sandwich-stream/download/sandwich-stream-2.0.0.tgz"},"maintainers":[{"name":"connrs","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sandwich-stream_2.0.0_1540210302569_0.0451138317943629"},"_hasShrinkwrap":false,"publish_time":1540210302737,"deprecated":"Use sandwich-stream@2.0.1 instead. Build issue occurred with Webpack","_cnpm_publish_time":1540210302737,"_cnpmcore_publish_time":"2021-12-17T00:56:57.216Z"},"1.0.0":{"engines":{"node":">= 0.10"},"name":"sandwich-stream","description":"A readable stream that concatenates multiple streams with optional head, tail & join buffers","version":"1.0.0","repository":{"type":"git","url":"https://github.com/connrs/node-sandwich-stream.git"},"main":"lib/sandwich-stream.js","scripts":{"test":"node_modules/tape/bin/tape test/*.js"},"licenses":[{"type":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.txt"}],"author":{"name":"connrs"},"dependencies":{},"devDependencies":{"tape":"~1.0.4"},"gitHead":"d67eb71b25da699676ccd1a2f68d96fbfb175392","bugs":{"url":"https://github.com/connrs/node-sandwich-stream/issues"},"homepage":"https://github.com/connrs/node-sandwich-stream","_id":"sandwich-stream@1.0.0","_shasum":"7830e45797b5933287f1f9b28f871907456262f2","_from":"sandwich-stream","_resolved":"file:sandwich-stream","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"connrs","email":"paul.connolley@gmail.com"},"maintainers":[{"name":"connrs","email":""}],"dist":{"shasum":"7830e45797b5933287f1f9b28f871907456262f2","size":2946,"noattachment":false,"key":"/sandwich-stream/-/sandwich-stream-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sandwich-stream/download/sandwich-stream-1.0.0.tgz"},"directories":{},"publish_time":1439105288705,"_hasShrinkwrap":false,"_cnpm_publish_time":1439105288705,"_cnpmcore_publish_time":"2021-12-17T00:56:57.447Z"},"0.0.4":{"engines":{"node":">= 0.10"},"name":"sandwich-stream","description":"A readable stream that concatenates multiple streams with optional head, tail & join buffers","version":"0.0.4","repository":{"type":"git","url":"https://github.com/connrs/node-sandwich-stream.git"},"main":"lib/sandwich-stream.js","scripts":{"test":"node_modules/tape/bin/tape test/*.js"},"licenses":[{"type":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.txt"}],"author":{"name":"connrs"},"dependencies":{},"devDependencies":{"tape":"~1.0.4"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/connrs/node-sandwich-stream/issues"},"_id":"sandwich-stream@0.0.4","dist":{"shasum":"da919a8a3a5fde1781979b16baec340d60c06167","size":3025,"noattachment":false,"key":"/sandwich-stream/-/sandwich-stream-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/sandwich-stream/download/sandwich-stream-0.0.4.tgz"},"_from":"sandwich-stream","_npmVersion":"1.3.8","_npmUser":{"name":"connrs","email":"paul.connolley@gmail.com"},"maintainers":[{"name":"connrs","email":""}],"directories":{},"publish_time":1377951263446,"_hasShrinkwrap":false,"_cnpm_publish_time":1377951263446,"_cnpmcore_publish_time":"2021-12-17T00:56:57.671Z"},"0.0.3":{"engines":{"node":">= 0.10"},"name":"sandwich-stream","description":"A readable stream that concatenates multiple streams with optional head, tail & join buffers","version":"0.0.3","repository":{"type":"git","url":"https://github.com/connrs/node-sandwich-stream.git"},"main":"lib/sandwich-stream.js","scripts":{"test":"node_modules/tape/bin/tape test/*.js"},"licenses":[{"type":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.txt"}],"author":{"name":"connrs"},"dependencies":{},"devDependencies":{"tape":"~1.0.4"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/connrs/node-sandwich-stream/issues"},"_id":"sandwich-stream@0.0.3","dist":{"shasum":"94fcbedaf06617907dc526713da9c05ea2b68e04","size":2980,"noattachment":false,"key":"/sandwich-stream/-/sandwich-stream-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/sandwich-stream/download/sandwich-stream-0.0.3.tgz"},"_from":"sandwich-stream","_npmVersion":"1.3.8","_npmUser":{"name":"connrs","email":"paul.connolley@gmail.com"},"maintainers":[{"name":"connrs","email":""}],"directories":{},"publish_time":1377905026361,"_hasShrinkwrap":false,"_cnpm_publish_time":1377905026361,"_cnpmcore_publish_time":"2021-12-17T00:56:57.892Z"},"0.0.2":{"engines":{"node":">= 0.10"},"name":"sandwich-stream","description":"A readable stream that concatenates multiple streams with optional head, tail & join buffers","version":"0.0.2","repository":{"type":"git","url":"https://github.com/connrs/node-sandwich-stream.git"},"main":"lib/sandwich-stream.js","scripts":{"test":"node_modules/tape/bin/tape test/*.js"},"licenses":[{"type":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.txt"}],"author":{"name":"connrs"},"dependencies":{},"devDependencies":{"tape":"~1.0.4"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/connrs/node-sandwich-stream/issues"},"_id":"sandwich-stream@0.0.2","dist":{"shasum":"308955dc87bbc13d92ea923994352d19a3169492","size":2905,"noattachment":false,"key":"/sandwich-stream/-/sandwich-stream-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sandwich-stream/download/sandwich-stream-0.0.2.tgz"},"_from":"sandwich-stream","_npmVersion":"1.3.8","_npmUser":{"name":"connrs","email":"paul.connolley@gmail.com"},"maintainers":[{"name":"connrs","email":""}],"directories":{},"publish_time":1377904292012,"_hasShrinkwrap":false,"_cnpm_publish_time":1377904292012,"_cnpmcore_publish_time":"2021-12-17T00:56:58.311Z"},"0.0.1":{"engines":{"node":">= 0.10"},"name":"sandwich-stream","description":"A readable stream that concatenates multiple streams with optional head, tail & join buffers","version":"0.0.1","repository":{"type":"git","url":"https://github.com/connrs/node-sandwich-stream.git"},"main":"lib/sandwich-stream.js","scripts":{"test":"node_modules/tape/bin/tape test/*.js"},"licenses":[{"type":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.txt"}],"author":{"name":"connrs"},"dependencies":{},"devDependencies":{"tape":"~1.0.4"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/connrs/node-sandwich-stream/issues"},"_id":"sandwich-stream@0.0.1","dist":{"shasum":"161b61af46585dc36785cbfb8b1b7efe0323760f","size":2739,"noattachment":false,"key":"/sandwich-stream/-/sandwich-stream-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sandwich-stream/download/sandwich-stream-0.0.1.tgz"},"_from":"sandwich-stream","_npmVersion":"1.3.8","_npmUser":{"name":"connrs","email":"paul.connolley@gmail.com"},"maintainers":[{"name":"connrs","email":""}],"directories":{},"publish_time":1377903088404,"_hasShrinkwrap":false,"_cnpm_publish_time":1377903088404,"_cnpmcore_publish_time":"2021-12-17T00:56:58.523Z"}},"readme":"# SandwichStream\n\n[![npm](https://img.shields.io/npm/v/sandwich-stream.svg?style=flat-square)](https://www.npmjs.com/package/sandwich-stream)\n[![npm](https://img.shields.io/npm/dt/sandwich-stream.svg?style=flat-square)](https://www.npmjs.com/package/sandwich-stream)\n[![Travis CI](https://img.shields.io/travis/connrs/node-sandwich-stream.svg?style=flat-square)](https://travis-ci.org/connrs/node-sandwich-stream)\n[![codecov](https://img.shields.io/codecov/c/github/connrs/node-sandwich-stream.svg?style=flat-square)](https://codecov.io/gh/connrs/node-sandwich-stream)\n[![Codacy Badge](https://img.shields.io/codacy/grade/6d64b00364bf413980280bd4e55d6115.svg?style=flat-square)](https://www.codacy.com/project/connrs/node-sandwich-stream/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=connrs/node-sandwich-stream&amp;utm_campaign=Badge_Grade_Dashboard)\n[![Dependencies](https://david-dm.org/connrs/node-sandwich-stream.svg?style=flat-square)](https://codeclimate.com/github/connrs/node-sandwich-stream/master/package.json)\n[![Known Vulnerabilities](https://snyk.io/test/github/connrs/node-sandwich-stream/badge.svg?style=flat-square&targetFile=package.json)](https://snyk.io/test/github/connrs/node-sandwich-stream?targetFile=package.json)\n[![Maintainability](https://api.codeclimate.com/v1/badges/a6a00d50601938edfdad/maintainability)](https://codeclimate.com/github/connrs/node-sandwich-stream/maintainability)\n\n## About\nWhile I'm not overjoyed about how performant the internals will operate, I wanted a readable stream that was ACTUALLY A READABLE STREAM. Not a streams1 stream masquerading as streams2. As soon as somebody writes a better concat stream as a readable stream with a nice simple API, this baby is going to develop some serious abandonment issues.\n\n## Installation\n```bash\nnpm install sandwich-stream --save\n```\n\n**note**: this code was made using it [TypeScript](https://www.typescriptlang.org/), and its typings are linked in [package.json](./package.json), so there's no need of installing _@types/sandwich-stream_ or anything related. \n\n## Usage\n```typescript\nimport { SandwichStream } from 'sandwich-stream';\n// OR EVEN:\n// const SandwichStream = require('sandwich-stream');\n\nconst sandwich = SandwichStream({\n    head: 'Thing at the top\\n',\n    tail: '\\nThing at the bottom',\n    separator: '\\n ---- \\n'\n});\n\nsandwich.add(aStreamIPreparedEarlier)\n        .add(anotherStreamIPreparedEarlier)\n        .add(aFurtherStreamIPreparedEarlier)\n        .pipe(process.stdout);\n\n// The thing at the top\n//  ---- \n// Stream1\n//  ---- \n// Stream2\n//  ---- \n// Stream3\n// The thing at the bottom\n```\n## Configuration Options\n* `head` option takes a string/buffer and pushes the string before all other content\n* `foot` option takes a string/buffer and pushes the string after all other data has been pushed\n* `separator` option pushes a string/buffer between each stream\n* [Readable Options](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/be662c475da091788139b486a55708f02e2880b6/types/node/index.d.ts#L6485) can also be passed through.\n\n## API\nToo add a stream use the **.add** method: `sandwich.add(streamVariable);`\n\n## More\nWanna known more about Node Streams? Read [this](https://medium.freecodecamp.org/node-js-streams-everything-you-need-to-know-c9141306be93).\n","_attachments":{},"homepage":"https://github.com/connrs/node-sandwich-stream#readme","bugs":{"url":"https://github.com/connrs/node-sandwich-stream/issues"},"license":"Apache-2.0"}