{"id":22356323,"url":"https://github.com/do-/node-untar-csv","last_synced_at":"2025-03-26T13:15:04.019Z","repository":{"id":207971851,"uuid":"720467769","full_name":"do-/node-untar-csv","owner":"do-","description":"Read a tar of multiple csv files as a stream of objects","archived":false,"fork":false,"pushed_at":"2023-11-19T15:00:28.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T15:03:04.332Z","etag":null,"topics":["csv","stream","tar"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/do-.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-18T15:24:25.000Z","updated_at":"2023-11-18T19:18:53.000Z","dependencies_parsed_at":"2025-01-31T14:29:47.143Z","dependency_job_id":"ffee71ea-083e-4850-a51d-5133fc4d53f9","html_url":"https://github.com/do-/node-untar-csv","commit_stats":null,"previous_names":["do-/node-untar-csv"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-%2Fnode-untar-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-%2Fnode-untar-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-%2Fnode-untar-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-%2Fnode-untar-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/do-","download_url":"https://codeload.github.com/do-/node-untar-csv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245659052,"owners_count":20651525,"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":["csv","stream","tar"],"created_at":"2024-12-04T14:09:54.380Z","updated_at":"2025-03-26T13:15:03.982Z","avatar_url":"https://github.com/do-.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![workflow](https://github.com/do-/node-untar-csv/actions/workflows/main.yml/badge.svg)\n![Jest coverage](./badges/coverage-jest%20coverage.svg)\n\n`untar-csv` is a node.js library for reading reading data from a [tar](https://en.wikipedia.org/wiki/Tar_(computing)) containing multiple similarly structured [CSV](https://datatracker.ietf.org/doc/html/rfc4180) files as a single [stream](https://nodejs.org/docs/latest/api/stream.html) of objects.\n\n# Installation\n```bash\nnpm install untar-csv\n```\n# Usage\n```js\nconst fs = require ('fs')\nconst zlib = require ('zlib')\n\nconst {TarCsvReader} = require ('untar-csv')\n\nconst reader = TarCsvReader ({\n//  test: entry =\u003e entry.name.indexOf ('.csv') \u003e -1,\n//  delimiter: ',',\n//  skip: 0,           // header lines\n//  fileNumField: '#', // how to name the file # property\n//  rowNumField: '##',  // how to name the line # property\n//  empty: null,\n    columns: ['id', 'name'],\n})\n\nfs.createReadStream ('lots-of-data.tar.gz').pipe (zlib.createGunzip ()).pipe (reader)\n\nfor await (const {id, name} of reader) {\n// do something with `id` and `name` \n}\n```\n\n# Options\nMost options are effectively passed to [CSVReader](https://github.com/do-/node-csv-events/wiki/CSVReader), see there for details.\n\n|Name|Default value|Description|\n|-|-|-|\n|`test`| `({name}) =\u003e true` |tar entry filter, structure described at [tar-stream](https://github.com/mafintosh/tar-stream)|\n|`columns`| |Array of column definitions|\n|`delimiter`|`','`|Column delimiter|\n|`skip`|`0`|Number of header lines to ignore|\n|`fileNumField` | `null` | The name of the file # property (null for no numbering)\n|`rowNumField` | `null` | The name of the line # property (null for no numbering)\n|`empty`|`null`|The `value` corresponding to zero length cell content|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdo-%2Fnode-untar-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdo-%2Fnode-untar-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdo-%2Fnode-untar-csv/lists"}