{"id":22222074,"url":"https://github.com/fabiospampinato/csv-simple-parser","last_synced_at":"2025-07-27T16:32:38.177Z","repository":{"id":188478362,"uuid":"678811185","full_name":"fabiospampinato/csv-simple-parser","owner":"fabiospampinato","description":"A simple, fast and configurable CSV parser.","archived":false,"fork":false,"pushed_at":"2025-01-28T21:54:21.000Z","size":1281,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T04:34:09.639Z","etag":null,"topics":["csv","fast","parser"],"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/fabiospampinato.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},"funding":{"github":"fabiospampinato","custom":"https://www.paypal.me/fabiospampinato"}},"created_at":"2023-08-15T12:41:33.000Z","updated_at":"2025-03-03T11:20:28.000Z","dependencies_parsed_at":"2024-04-05T01:31:22.824Z","dependency_job_id":"bcb09685-7b50-492a-82cf-22a6305555f0","html_url":"https://github.com/fabiospampinato/csv-simple-parser","commit_stats":null,"previous_names":["fabiospampinato/csv-simple-parser"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/fabiospampinato/csv-simple-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fcsv-simple-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fcsv-simple-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fcsv-simple-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fcsv-simple-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiospampinato","download_url":"https://codeload.github.com/fabiospampinato/csv-simple-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fcsv-simple-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267387050,"owners_count":24079166,"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-07-27T02:00:11.917Z","response_time":82,"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":["csv","fast","parser"],"created_at":"2024-12-02T23:16:48.298Z","updated_at":"2025-07-27T16:32:38.170Z","avatar_url":"https://github.com/fabiospampinato.png","language":"TypeScript","funding_links":["https://github.com/sponsors/fabiospampinato","https://www.paypal.me/fabiospampinato"],"categories":[],"sub_categories":[],"readme":"# CSV Simple Parser\n\nA simple, fast and configurable CSV parser.\n\n## Install\n\n```sh\nnpm install csv-simple-parser\n```\n\n## Usage\n\n```ts\nimport parse from 'csv-simple-parser';\n\n{ // Parse a CSV string, as an array of arrays of strings\n  const csv = 'Name,Surname\\n\"John\",Doe\\nJane,\"Doe\"';\n  const result = parse ( csv ); // =\u003e [['Name', 'Surname'], ['John', 'Doe'], ['Jane', 'Doe']]\n}\n\n{ // Parse a CSV string, as an array of objects, considering the first row the headers row\n  const csv = 'Name,Surname\\n\"John\",Doe\\nJane,\"Doe\"';\n  const options = { header: true };\n  const result = parse ( csv, options ); // =\u003e [{ Name: 'John', Surname: 'Doe' }, { Name: 'Jane', Surname: 'Doe' }]\n}\n\n{ // Parse a CSV string, as an array of objects, inferring number/null/boolean types automatically\n  const csv = 'Name,Surname,Age,Pirate,Parent\\n\"John\",Doe,50,true,null\\nJane,\"Doe\",50,FALSE,NULL';\n  const options = { header: true, infer: true };\n  const result = parse ( csv, options ); // =\u003e [{ Name: 'John', Surname: 'Doe', Age: 50, Pirate: true, Parent: null }, { Name: 'Jane', Surname: 'Doe', Age: 50, Pirate: false, Parent: null }]\n}\n\n{ // Parse a CSV string, as an array of objects, using a custom infer function\n  // The default infer function is here: https://github.com/fabiospampinato/csv-simple-parser/blob/master/src/utils.ts\n  const csv = 'Name,Surname,Age,Pirate,Parent\\n\"John\",Doe,50,\"1\",1\\nJane,\"Doe\",50,\"0\",0';\n  const infer = ( value, x, y, isExplicitlyQuoted ) =\u003e isExplicitlyQuoted ? value : value === '0' ? false : value === '1' ? true : value;\n  const options = { header: true, infer };\n  const result = parse ( csv, options ); // =\u003e [{ Name: 'John', Surname: 'Doe', Age: '50', Pirate: '1', Parent: true }, { Name: 'Jane', Surname: 'Doe', Age: 50, '0': false, Parent: false }]\n}\n\n{ // Parse a CSV-like string, with custom delimiters and quotes\n  const csv = \"Name|Surname\\n'John'|Doe\\nJane|'Doe'\";\n  const options = { header: true, delimiter: '|', quote: \"'\" };\n  const result = parse ( csv, options ); // =\u003e [{ Name: 'John', Surname: 'Doe' }, { Name: 'Jane', Surname: 'Doe' }]\n}\n\n{ // Parse a potentially malformed CSV-like string, which could have inconsistent newlines\n  const csv = 'Name,Surname\\r\\n\"John\",Doe\\nJane,\"Doe\"';\n  const options = { optimistic: false };\n  const result = parse ( csv ); // =\u003e [['Name', 'Surname'], ['John', 'Doe'], ['Jane', 'Doe']]\n}\n```\n\n## License\n\nMIT © Fabio Spampinato\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Fcsv-simple-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiospampinato%2Fcsv-simple-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Fcsv-simple-parser/lists"}