{"id":20088067,"url":"https://github.com/jacobbubu/pull-write-file","last_synced_at":"2025-09-02T00:36:12.245Z","repository":{"id":57119957,"uuid":"293029189","full_name":"jacobbubu/pull-write-file","owner":"jacobbubu","description":null,"archived":false,"fork":false,"pushed_at":"2020-09-27T10:04:54.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T06:40:25.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jacobbubu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-05T07:48:34.000Z","updated_at":"2020-09-27T09:58:56.000Z","dependencies_parsed_at":"2022-08-23T21:20:40.699Z","dependency_job_id":null,"html_url":"https://github.com/jacobbubu/pull-write-file","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobbubu%2Fpull-write-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobbubu%2Fpull-write-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobbubu%2Fpull-write-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobbubu%2Fpull-write-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacobbubu","download_url":"https://codeload.github.com/jacobbubu/pull-write-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241523941,"owners_count":19976424,"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-11-13T16:11:40.372Z","updated_at":"2025-03-02T14:42:36.654Z","avatar_url":"https://github.com/jacobbubu.png","language":"TypeScript","readme":"# @jacobbubu/pull-write-file\n\n[![Build Status](https://github.com/jacobbubu/pull-write-file/workflows/Build%20and%20Release/badge.svg)](https://github.com/jacobbubu/pull-write-file/actions?query=workflow%3A%22Build+and+Release%22)\n[![Coverage Status](https://coveralls.io/repos/github/jacobbubu/pull-write-file/badge.svg)](https://coveralls.io/github/jacobbubu/pull-write-file)\n[![npm](https://img.shields.io/npm/v/@jacobbubu/pull-write-file.svg)](https://www.npmjs.com/package/@jacobbubu/pull-write-file/)\n\n\u003e A typescript version of [pull-write-file](https://github.com/dominictarr/pull-write-file)\n\n# pull-write-file\n\npull-stream version of fs.createWriteStream\n\ncurrently really simple and does not yet support all fs.createWriteStream options yet.\n\n## why rewriting?\n\n* Familiarity with the original author's intent\n* Strong type declarations for colleagues to understand and migrate to other programming languages\n\n## Example\n\n``` ts\nimport * as pull from 'pull-stream'\nimport * as fs from 'fs'\nimport * as path from 'path'\nimport osenv = require('osenv')\nimport writeFile from '@jacobbubu/pull-write-file'\n\nconst file = path.join(osenv.tmpdir(), 'pull-write-file_test.' + Date.now())\npull(\n  pull.values([1, 2, 3, 4]),\n  writeFile(file, {}, (err) =\u003e {\n    const readBack = fs.readFileSync(file)\n    console.log(readBack.toString()) // '1234'\n    fs.unlinkSync(file)\n    done()\n  })\n)\n```\n\n## Performance\n\nFor large buffers this is currently as fast as node's streams,\nbut for lots of small buffers it's a little less.\nNode uses the fs binding's `writev` to pass many buffers to the kernel simutaniously.\n\nTODO: benchmarks with graphs comparing node streams and pull streams.\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobbubu%2Fpull-write-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacobbubu%2Fpull-write-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobbubu%2Fpull-write-file/lists"}