{"id":16940486,"url":"https://github.com/spencermountain/sunday-driver","last_synced_at":"2025-07-14T21:33:36.231Z","repository":{"id":32397802,"uuid":"132483052","full_name":"spencermountain/sunday-driver","owner":"spencermountain","description":"be cool with large files","archived":false,"fork":false,"pushed_at":"2022-04-09T21:41:57.000Z","size":2004,"stargazers_count":6,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-19T13:58:06.798Z","etag":null,"topics":["large-files","stream-processing"],"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/spencermountain.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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":"2018-05-07T15:48:21.000Z","updated_at":"2023-07-29T21:27:25.000Z","dependencies_parsed_at":"2022-08-07T17:16:01.971Z","dependency_job_id":null,"html_url":"https://github.com/spencermountain/sunday-driver","commit_stats":null,"previous_names":["spencermountain/not-easy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spencermountain/sunday-driver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencermountain%2Fsunday-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencermountain%2Fsunday-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencermountain%2Fsunday-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencermountain%2Fsunday-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spencermountain","download_url":"https://codeload.github.com/spencermountain/sunday-driver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencermountain%2Fsunday-driver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261111143,"owners_count":23111149,"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":["large-files","stream-processing"],"created_at":"2024-10-13T21:07:10.803Z","updated_at":"2025-07-14T21:33:36.206Z","avatar_url":"https://github.com/spencermountain.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\t\u003ch3\u003esunday-driver\u003c/h3\u003e\n\t\u003ca href=\"https://npmjs.org/package/sunday-driver\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/npm/v/sunday-driver.svg?style=flat-square\" /\u003e\n\t\u003c/a\u003e\n  \u003ca href=\"https://www.codacy.com/app/spencerkelly86/sunday-driver\"\u003e\n    \u003cimg src=\"https://api.codacy.com/project/badge/grade/1b0f3874f43f4b8c87ac855bb69bca8f\" /\u003e\n  \u003c/a\u003e\n\t\u003cdiv\u003eprocess a large file, at a steady cruise\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003e\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\t\u003ch2\u003e🕶️\u003c/h2\u003e\n  \u003cdiv\u003e\u003csup\u003e - slow is smooth, smooth is fast -\u003c/sup\u003e\u003c/div\u003e\n\u003c/div\u003e\n\n**sunday-driver** works through a large file *at a responsible* pace - it pauses to let you consider the data, at given points, and waits to resume working once that's all done.\n\nthis allows processing a large file, by sizable chunks, without any race-conditions or memory leaking.\n\n(heavily) inspired by [line-by-line](https://github.com/Osterjour/line-by-line), by [Markus Ostertag](https://github.com/Osterjour)🙏\n\n\u003cdiv align=\"center\"\u003e\n  \u003ccode\u003enpm i sunday-driver\u003c/code\u003e\n\u003c/div\u003e\n\n```js\nconst sundayDriver = require('sunday-driver')\n\nlet options= {\n\tfile: './my/large/file.tsv',\n\tsplitter: '\\n',\n\tstart: '80%', //as percentages, or in bytes\n\tend: '100%',\n\t//do your thing, for each segment\n\teach: (chunk, resume) =\u003e {\n\t\tconsole.log(chunk)//do your thing..\n\t\tresume()\n\t}\n\t//log progress-based events\n\tatPercent: {\n\t\t50: (status) =\u003e {\n\t\t\tconsole.log('50%!')\n\t\t},\n\t\t75: () =\u003e {\n\t\t\tconsole.log('75%!')\n\t\t},\n\t},\n\t//log time-based events\n\tatInterval: {\n\t\t'1min': (status) =\u003e {\n\t\tconsole.log('1 minute')\n\t\t},\n\t\t'2mins': () =\u003e {\n\t\tconsole.log('2 minutes')\n\t\t},\n\t}\n}\n\nsundayDriver(options).then((status)=\u003e{\n\tconsole.log('done!')\n})\n```\n\nany events/intervals will provide you with all the details of the current reader's status:\n```js\n/*{\n  chunksDone:: 10,     // how many times we've called the 'each' function\n\tbytesDone:: 20480,   // how many bytes we've processed so far\n\tfilesize:: 61440,    // size of the whole file\n\tposition: 34.42,     // where, in percentage, we are in the file. (if we didn't start at the top!)\n\tprogress: 68.84      // how far, in percentage, we are to being complete\n}*/\n```\n\nit was built to support unleashing multiple workers on the same file, and letting them run safely and responsibly, without blowing any fuses.\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspencermountain%2Fsunday-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspencermountain%2Fsunday-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspencermountain%2Fsunday-driver/lists"}