{"metapak":{"configs":["main","readme","tsesm","jsdocs","jest","eslint","codeclimate","ghactions"],"data":{"files":"'src/**/*.ts'","testsFiles":"'src/**/*.tests.ts'","distFiles":"'dist/**/*.js'","ignore":["dist"],"bundleFiles":["dist","src"]}},"name":"streamqueue","version":"2.0.0","description":"StreamQueue pipe the queued streams one by one in order to preserve their content order.","homepage":"https://github.com/nfroidure/StreamQueue","main":"dist/index.js","scripts":{"build":"rimraf 'dist' && tsc --outDir dist","changelog":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","cli":"env NODE_ENV=${NODE_ENV:-cli}","cover":"npm run jest -- --coverage","cz":"env NODE_ENV=${NODE_ENV:-cli} git cz","doc":"echo \"# API\" > API.md; jsdoc2md 'dist/**/*.js' >> API.md && git add API.md","format":"npm run prettier","jest":"NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest","lint":"eslint 'src/**/*.ts'","metapak":"metapak","precz":"npm t && npm run lint && npm run metapak -- -s && npm run build && npm run doc","prettier":"prettier --write 'src/**/*.ts'","preversion":"npm t && npm run lint && npm run build && npm run metapak -- -s && npm run doc","rebuild":"swc ./src -s -d dist -C jsc.target=es2022","test":"npm run jest","type-check":"tsc --pretty --noEmit","version":"npm run changelog && git add CHANGELOG.md"},"repository":{"type":"git","url":"git://github.com/nfroidure/StreamQueue.git"},"keywords":["queue","streaming","stream","async","pipe"],"dependencies":{"yerror":"^8.0.0"},"devDependencies":{"@eslint/js":"^9.7.0","@swc/cli":"^0.4.0","@swc/core":"^1.6.13","@swc/helpers":"^0.5.12","@swc/jest":"^0.2.36","commitizen":"^4.3.0","conventional-changelog-cli":"^5.0.0","cz-conventional-changelog":"^3.3.0","eslint":"^9.7.0","eslint-config-prettier":"^9.1.0","eslint-plugin-jest":"^28.6.0","eslint-plugin-prettier":"^5.1.3","jest":"^29.7.0","jsdoc-to-markdown":"^8.0.0","metapak":"^6.0.1","metapak-nfroidure":"^18.2.0","prettier":"^3.3.3","rimraf":"^6.0.1","streamtest":"^3.0.1","typescript":"^5.5.3","typescript-eslint":"^7.16.0"},"author":{"name":"Nicolas Froidure","email":"nicolas.froidure@insertafter.com","url":"https://insertafter.com/en/index.html"},"engines":{"node":">=20.11.1"},"licenses":[{"type":"MIT","url":"https://github.com/nfroidure/StreamQueue/blob/master/LICENSE"}],"bugs":{"url":"https://github.com/nfroidure/StreamQueue/issues"},"license":"MIT","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"greenkeeper":{"ignore":["commitizen","cz-conventional-changelog","conventional-changelog-cli","typescript","rimraf","@swc/cli","@swc/core","@swc/helpers","jsdoc-to-markdown","jest","@swc/jest","eslint","prettier","eslint-config-prettier","eslint-plugin-prettier","typescript-eslint"]},"contributors":[],"type":"module","types":"dist/index.d.ts","jest":{"coverageReporters":["lcov"],"testPathIgnorePatterns":["/node_modules/"],"roots":["<rootDir>/src"],"transform":{"^.+\\.tsx?$":["@swc/jest",{}]},"testEnvironment":"node","moduleNameMapper":{"(.+)\\.js":"$1"},"extensionsToTreatAsEsm":[".ts"],"prettierPath":null},"overrides":{"eslint":"^9.7.0"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"all","proseWrap":"always"},"_id":"streamqueue@2.0.0","gitHead":"3ba437add426ab458df6323df79da4f4a3422065","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-Qs4M2u0Ujj3oHrI9p2ihZ3Jo4xWCc9et2FL8b6qQ6kd9S7pLdeRHUxY1EbvHKlslDYc8i7mL7kXFFZ8zQCy9qg==","shasum":"07928802ca2fe58e246e8dd7259802d5cd1554bf","tarball":"http://registry-npm.ywwl.com/streamqueue/download/streamqueue-2.0.0.tgz","fileCount":13,"unpackedSize":132841,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGAZRGgc745X606a9Huiw0DUtAvI71BiiBKnIlJWaUNzAiAtT/dQujRPNAgQDsTlBbKfNTjeA/AcgmUP4nioH8IFyg=="}],"size":16501,"noattachment":false,"key":"/streamqueue/-/streamqueue-2.0.0.tgz"},"_npmUser":{"name":"nfroidure","email":"nicolas.froidure@insertafter.com"},"directories":{},"maintainers":[{"name":"nfroidure","email":"nicolas.froidure@insertafter.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/streamqueue_2.0.0_1721294758325_0.14133844934217765"},"_hasShrinkwrap":false,"readme":"[//]: # ( )\n[//]: # (This file is automatically generated by a `metapak`)\n[//]: # (module. Do not change it  except between the)\n[//]: # (`content:start/end` flags, your changes would)\n[//]: # (be overridden.)\n[//]: # ( )\n# streamqueue\n> StreamQueue pipe the queued streams one by one in order to preserve their content order.\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nfroidure/streamqueue/blob/main/LICENSE)\n\n\n[//]: # (::contents:start)\n\n## Usage\n\nInstall the [npm module](https://npmjs.org/package/streamqueue):\n\n```sh\nnpm install streamqueue --save\n```\n\nThen, in your scripts:\n\n```js\nimport { StreamQueue } from 'streamqueue';\nimport { createReadStream } from 'node:fs';\n\nconst queue = new StreamQueue(\n  createReadStream('input.txt'),\n  createReadStream('input2.txt'),\n  createReadStream('input3.txt'),\n).pipe(process.stdout);\n```\n\nStreamQueue also accept functions returning streams, the above can be written\nlike this, doing system calls only when piping:\n\n```js\nimport { queueStreams } = require('streamqueue');\nimport { createReadStream } from 'node:fs';\n\nconst queue = queueStreams(\n  createReadStream.bind(null, 'input.txt'),\n  createReadStream.bind(null, 'input2.txt'),\n  createReadStream.bind(null, 'input3.txt'),\n).pipe(process.stdout);\n```\n\nObject-oriented traditionnal API offers more flexibility:\n\n```js\nimport { StreamQueue } from 'streamqueue';\nimport { createReadStream } from 'node:fs';\n\nconst queue = new StreamQueue();\n\nqueue.queue(\n  createReadStream('input.txt'),\n  createReadStream('input2.txt'),\n  createReadStream('input3.txt'),\n);\nqueue.done();\n\nqueue.pipe(process.stdout);\n```\n\nYou can also chain StreamQueue methods like that:\n\n```js\nimport StreamQueue from 'streamqueue';\nimport { createReadStream } from 'node:fs';\n\nnew StreamQueue()\n  .queue(createReadStream('input.txt'))\n  .queue(createReadStream('input2.txt'))\n  .queue(createReadStream('input3.txt'))\n  .done()\n  .pipe(process.stdout);\n```\n\nYou can queue new streams at any moment until you call the done() method. So the\ncreated stream will not fire the end event until done() call.\n\n## Stats\n\n[![NPM](https://nodei.co/npm/streamqueue.png?downloads=true&stars=true)](https://nodei.co/npm/streamqueue/)\n[![NPM](https://nodei.co/npm-dl/streamqueue.png)](https://nodei.co/npm/streamqueue/)\n\n## Contributing\n\nFeel free to propose your code if you agree with publishing it under the MIT\nlicense.\n\n[//]: # (::contents:end)\n\n# API\n## Classes\n\n<dl>\n<dt><a href=\"#StreamQueue\">StreamQueue</a></dt>\n<dd><p>Pipe queued streams sequentially</p>\n</dd>\n</dl>\n\n## Functions\n\n<dl>\n<dt><a href=\"#queueObjectStreams\">queueObjectStreams(options, ...streams)</a> ⇒</dt>\n<dd><p>Create a new queue in object mode and pipe given streams and end if some</p>\n</dd>\n<dt><a href=\"#queueStreams\">queueStreams(options, ...streams)</a> ⇒</dt>\n<dd><p>Create a new queue and pipe given streams and end if some</p>\n</dd>\n</dl>\n\n<a name=\"StreamQueue\"></a>\n\n## StreamQueue\nPipe queued streams sequentially\n\n**Kind**: global class  \n\n* [StreamQueue](#StreamQueue)\n    * [new StreamQueue(options, ...streams)](#new_StreamQueue_new)\n    * [.queue(...streams)](#StreamQueue+queue) ⇒\n    * [.done(...streams)](#StreamQueue+done) ⇒\n\n<a name=\"new_StreamQueue_new\"></a>\n\n### new StreamQueue(options, ...streams)\nCreate a new queue and pipe given streams and end if some\n\n**Returns**: StreamQueue  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | The queue options |\n| options.objectMode | <code>boolean</code> | Operate in object mode |\n| options.pauseFlowingStream | <code>boolean</code> | Pause given streams that are flowing |\n| options.resumeFlowingStream | <code>boolean</code> | Resume given streams that are flowing |\n| ...streams | <code>Readable</code> \\| <code>function</code> | The stream or stream returning function to pipe in |\n\n<a name=\"StreamQueue+queue\"></a>\n\n### streamQueue.queue(...streams) ⇒\nQueue each stream given in argument\n\n**Kind**: instance method of [<code>StreamQueue</code>](#StreamQueue)  \n**Returns**: StreamQueue  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| ...streams | <code>Readable</code> \\| <code>function</code> | The stream or stream returning function to pipe in |\n\n<a name=\"StreamQueue+done\"></a>\n\n### streamQueue.done(...streams) ⇒\nQueue each stream given in argument and end\n\n**Kind**: instance method of [<code>StreamQueue</code>](#StreamQueue)  \n**Returns**: StreamQueue  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| ...streams | <code>Readable</code> \\| <code>function</code> | The stream or stream returning function to pipe in |\n\n<a name=\"queueObjectStreams\"></a>\n\n## queueObjectStreams(options, ...streams) ⇒\nCreate a new queue in object mode and pipe given streams and end if some\n\n**Kind**: global function  \n**Returns**: StreamQueue  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | The queue options |\n| ...streams | <code>Readable</code> \\| <code>function</code> | The stream or stream returning function to pipe in |\n\n<a name=\"queueStreams\"></a>\n\n## queueStreams(options, ...streams) ⇒\nCreate a new queue and pipe given streams and end if some\n\n**Kind**: global function  \n**Returns**: StreamQueue  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | The queue options |\n| ...streams | <code>Readable</code> \\| <code>function</code> | The stream or stream returning function to pipe in |\n\n\n# Authors\n- [Nicolas Froidure](https://insertafter.com/en/index.html)\n\n# License\n[MIT](https://github.com/nfroidure/streamqueue/blob/main/LICENSE)\n","publish_time":1721294758533,"_cnpm_publish_time":1721294758533,"dist-tags":{"beta":"0.1.2","latest":"2.0.0"}}