{"id":17736622,"url":"https://github.com/parro-it/ai-from-stream","last_synced_at":"2025-03-31T19:17:10.183Z","repository":{"id":57174758,"uuid":"111127890","full_name":"parro-it/ai-from-stream","owner":"parro-it","description":"create an async iterable from a stream","archived":false,"fork":false,"pushed_at":"2017-11-28T18:21:55.000Z","size":290,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-13T08:57:34.199Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parro-it.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-17T16:49:21.000Z","updated_at":"2019-07-09T11:55:13.000Z","dependencies_parsed_at":"2022-08-29T00:10:38.114Z","dependency_job_id":null,"html_url":"https://github.com/parro-it/ai-from-stream","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fai-from-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fai-from-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fai-from-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fai-from-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parro-it","download_url":"https://codeload.github.com/parro-it/ai-from-stream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523847,"owners_count":20791444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-26T00:23:45.785Z","updated_at":"2025-03-31T19:17:10.156Z","avatar_url":"https://github.com/parro-it.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ai-from-stream\n\n[![Travis Build Status](https://img.shields.io/travis/parro-it/ai-from-stream/master.svg)](http://travis-ci.org/parro-it/ai-from-stream)\n[![NPM downloads](https://img.shields.io/npm/dt/ai-from-stream.svg)](https://npmjs.org/package/ai-from-stream)\n\n\u003e create an async iterable from a stream\n\nThis module convert an instance of readable node Stream into an async iterable.\n\n## Usage\n\nWrite content of a file in a for loop:\n\n```js\nimport fromStream from \".\";\nimport { createReadStream } from \"fs\";\n\nconst stream = createReadStream(`file.txt`, \"utf8\");\nfor await (const chunk of fromStream(stream)) {\n  console.log(chunk);\n}\n```\n\nThis will output the content of `file.txt` file\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n### aiFromStream\n\nCreate an async iterable from a stream\n\n**Parameters**\n\n* `stream` **ReadableStream** the stream to transform\n\nReturns **AsyncIterable** converted iterator\n\n## Install\n\nWith [npm](https://npmjs.org/) installed, run\n\n```bash\nnpm install --save ai-from-stream\n```\n\n## See Also\n\n* [`noffle/common-readme`](https://github.com/noffle/common-readme)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparro-it%2Fai-from-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparro-it%2Fai-from-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparro-it%2Fai-from-stream/lists"}