{"id":20673970,"url":"https://github.com/dmitriym09/stream-storage","last_synced_at":"2026-04-17T16:31:18.942Z","repository":{"id":35060327,"uuid":"201433412","full_name":"dmitriym09/stream-storage","owner":"dmitriym09","description":"Simple duplex nodejs streams for cache large data in memory and files.","archived":false,"fork":false,"pushed_at":"2022-12-30T18:24:34.000Z","size":217,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-01T07:27:09.344Z","etag":null,"topics":["buffer","cache","duplex","js","memory","nodejs","stream"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmitriym09.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-09T09:11:38.000Z","updated_at":"2020-08-28T08:20:47.000Z","dependencies_parsed_at":"2023-01-15T12:58:48.343Z","dependency_job_id":null,"html_url":"https://github.com/dmitriym09/stream-storage","commit_stats":null,"previous_names":["dmitriym09/stream-cache"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dmitriym09/stream-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriym09%2Fstream-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriym09%2Fstream-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriym09%2Fstream-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriym09%2Fstream-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmitriym09","download_url":"https://codeload.github.com/dmitriym09/stream-storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriym09%2Fstream-storage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31936508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T12:37:54.787Z","status":"ssl_error","status_checked_at":"2026-04-17T12:37:25.095Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["buffer","cache","duplex","js","memory","nodejs","stream"],"created_at":"2024-11-16T20:43:09.597Z","updated_at":"2026-04-17T16:31:18.907Z","avatar_url":"https://github.com/dmitriym09.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node stream storage\n\n![Version](https://img.shields.io/badge/version-1.0.0-green.svg)\n![npm](https://img.shields.io/npm/dy/stream-storage)\n\nSimple duplex streams for cache large data in memory and files.\n\n## Installing\n\n```bash\nnpm install stream-storage\n```\n\n## Usage\n\n```js\nimport { StreamStorage } from 'stream-storage';\nconst streamStorage = new StreamStorage();\n// using ...\nstreamStorage.clear();\n```\n\n### stream-storage\n\n**StreamStorage** extends the standard [stream.Duplex](https://nodejs.org/api/stream.html#stream_class_stream_duplex) interface. All writes data to this stream will accumulate in internal [Buffers](https://nodejs.org/api/buffer.html). Data exceeding the *maxMemorySize* of the size will be saved to a file.\n\nYou can change default options:\n\n```js\nconst streamStorage = new StreamStorage({\n  maxMemorySize:      (32 * 1024),  // max memory size, bytes\n  tmpDir:             '.',          // temp dir for a file\n  pushMsec:           1,            // pushed data interval, msec\n  chunkSize:          (8 * 1024),   // pushed data chunk size, bytes\n});\n```\n\nFor rereading data you can move current stream to new by `StreamStorage.move()`.\n\nMore using cases and examples you can see in [test](test/test.mjs).\n\n## Contributors\n\n- dmitriym09 \u003cdmitriym.09.12.1989@gmail.com\u003e\n\nThanks to the [node-stream-buffer](https://github.com/samcday/node-stream-buffer) for inspiration!\n\n## dev\n\n### test\n\nFor run test:\n\n```js\nnpm run test\n```\n\n## versions\n\n- **0.0.1** - init\n- **0.0.2**\n- **0.0.3**\n- **0.0.4**\n- **0.0.5** - fix pause\n- **1.0.0** - .mjs, impl StreamStorage.move()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriym09%2Fstream-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitriym09%2Fstream-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriym09%2Fstream-storage/lists"}