{"id":16143564,"url":"https://github.com/isaacs/fs-minipass","last_synced_at":"2025-10-08T19:18:49.955Z","repository":{"id":25012973,"uuid":"102982143","full_name":"isaacs/fs-minipass","owner":"isaacs","description":"fs read and write streams based on minipass","archived":false,"fork":false,"pushed_at":"2024-07-17T21:51:24.000Z","size":204,"stargazers_count":20,"open_issues_count":3,"forks_count":5,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-09-28T22:14:58.094Z","etag":null,"topics":["npm-cli"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isaacs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["isaacs"]}},"created_at":"2017-09-09T20:09:21.000Z","updated_at":"2025-06-15T23:42:15.000Z","dependencies_parsed_at":"2024-09-16T20:43:57.610Z","dependency_job_id":null,"html_url":"https://github.com/isaacs/fs-minipass","commit_stats":{"total_commits":85,"total_committers":10,"mean_commits":8.5,"dds":0.5176470588235293,"last_synced_commit":"878b2b0e70ed2e2ce28dcaf38244d5bf2c3a3d83"},"previous_names":["npm/fs-minipass"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/isaacs/fs-minipass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Ffs-minipass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Ffs-minipass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Ffs-minipass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Ffs-minipass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isaacs","download_url":"https://codeload.github.com/isaacs/fs-minipass/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Ffs-minipass/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278254484,"owners_count":25956607,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["npm-cli"],"created_at":"2024-10-10T00:09:34.277Z","updated_at":"2025-10-08T19:18:49.932Z","avatar_url":"https://github.com/isaacs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/isaacs"],"categories":[],"sub_categories":[],"readme":"# fs-minipass\n\nFilesystem streams based on [minipass](http://npm.im/minipass).\n\n4 classes are exported:\n\n- ReadStream\n- ReadStreamSync\n- WriteStream\n- WriteStreamSync\n\nWhen using `ReadStreamSync`, all of the data is made available\nimmediately upon consuming the stream.  Nothing is buffered in memory\nwhen the stream is constructed.  If the stream is piped to a writer,\nthen it will synchronously `read()` and emit data into the writer as\nfast as the writer can consume it.  (That is, it will respect\nbackpressure.)  If you call `stream.read()` then it will read the\nentire file and return the contents.\n\nWhen using `WriteStreamSync`, every write is flushed to the file\nsynchronously.  If your writes all come in a single tick, then it'll\nwrite it all out in a single tick.  It's as synchronous as you are.\n\nThe async versions work much like their node builtin counterparts,\nwith the exception of introducing significantly less Stream machinery\noverhead.\n\n## USAGE\n\nIt's just streams, you pipe them or read() them or write() to them.\n\n```js\nconst fsm = require('fs-minipass')\nconst readStream = new fsm.ReadStream('file.txt')\nconst writeStream = new fsm.WriteStream('output.txt')\nwriteStream.write('some file header or whatever\\n')\nreadStream.pipe(writeStream)\n```\n\n## ReadStream(path, options)\n\nPath string is required, but somewhat irrelevant if an open file\ndescriptor is passed in as an option.\n\nOptions:\n\n- `fd` Pass in a numeric file descriptor, if the file is already open.\n- `readSize` The size of reads to do, defaults to 16MB\n- `size` The size of the file, if known.  Prevents zero-byte read()\n  call at the end.\n- `autoClose` Set to `false` to prevent the file descriptor from being\n  closed when the file is done being read.\n\n## WriteStream(path, options)\n\nPath string is required, but somewhat irrelevant if an open file\ndescriptor is passed in as an option.\n\nOptions:\n\n- `fd` Pass in a numeric file descriptor, if the file is already open.\n- `mode` The mode to create the file with. Defaults to `0o666`.\n- `start` The position in the file to start reading.  If not\n  specified, then the file will start writing at position zero, and be\n  truncated by default.\n- `autoClose` Set to `false` to prevent the file descriptor from being\n  closed when the stream is ended.\n- `flags` Flags to use when opening the file.  Irrelevant if `fd` is\n  passed in, since file won't be opened in that case.  Defaults to\n  `'a'` if a `pos` is specified, or `'w'` otherwise.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacs%2Ffs-minipass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisaacs%2Ffs-minipass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacs%2Ffs-minipass/lists"}