{"_id":"s-flatten","name":"s-flatten","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"s-flatten","version":"1.0.1","description":"A flatten function for Web Streams","keywords":["web streams","streams","flatten","flat","TransformStream"],"homepage":"https://github.com/trevorah/s-flatten#readme","bugs":{"url":"https://github.com/trevorah/s-flatten/issues"},"repository":{"type":"git","url":"git+https://github.com/trevorah/s-flatten.git"},"license":"MIT","author":{"name":"Andy Trevorah","email":"andy@trevorah.net"},"type":"module","main":"index.js","exports":{"types":"./index.d.ts","default":"./index.js"},"scripts":{"test":"node --test"},"_id":"s-flatten@1.0.1","gitHead":"5084311b26cac520c4082d886181a2ae066d743e","types":"./index.d.ts","_nodeVersion":"22.11.0","_npmVersion":"11.0.0","dist":{"integrity":"sha512-BwTlVXFQMmsCA12Ys7hw2XPU2qmPPBsCxagbNv87bBusTwhsatGm+woHFN1YOs+gxptMlchTnwyMAIQzlkXAig==","shasum":"197f279bdf695a6f4b24930c2220dfcc14fb343e","tarball":"https://registry.npmjs.org/s-flatten/-/s-flatten-1.0.1.tgz","fileCount":5,"unpackedSize":1872,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDOD0h8K1PS3gIE0+LUVEtXnVRPo3wYlKpWkW5DPw5zIAiAV0ZTYinM1qbiuRsLk5XolLQELHrbik0JKuN0tur1hhQ=="}]},"_npmUser":{"name":"trevorah","email":"andy@trevorah.net"},"directories":{},"maintainers":[{"name":"trevorah","email":"andy@trevorah.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/s-flatten_1.0.1_1738098712542_0.9738567072053967"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-28T21:11:52.541Z","1.0.1":"2025-01-28T21:11:52.704Z","modified":"2025-01-28T21:11:52.980Z"},"maintainers":[{"name":"trevorah","email":"andy@trevorah.net"}],"description":"A flatten function for Web Streams","homepage":"https://github.com/trevorah/s-flatten#readme","keywords":["web streams","streams","flatten","flat","TransformStream"],"repository":{"type":"git","url":"git+https://github.com/trevorah/s-flatten.git"},"author":{"name":"Andy Trevorah","email":"andy@trevorah.net"},"bugs":{"url":"https://github.com/trevorah/s-flatten/issues"},"license":"MIT","readme":"# s-flatten\n\nA flatten function for Web Streams. Like `Array.prototype.flat()`, but for Web Streams.\n\n## Installation\n\n```bash\nnpm install s-flatten\n```\n\n## Usage\n\n```js\nimport sFlatten from \"s-flatten\";\n\nconst stream = ReadableStream.from([\n  [1, 2],\n  [3, 4],\n]).pipeThrough(sFlatten());\n\nconst result = await Array.fromAsync(stream);\n\nconsole.log(result); // [1, 2, 3, 4]\n```\n\n## API\n\n### `sFlatten()`\n\nReturns a `TransformStream<T[], T>` that flattens the input stream.\n\n## Related\n\n- [s-batch](https://github.com/trevorah/s-batch) - Batch items in a stream\n- [s-compose](https://github.com/trevorah/s-compose) - Compose streams together\n","readmeFilename":"README.md"}