{"id":15988879,"url":"https://github.com/etr2460/export-data","last_synced_at":"2026-05-14T12:31:42.982Z","repository":{"id":65134115,"uuid":"582499983","full_name":"etr2460/export-data","owner":"etr2460","description":"Export data in React to CSV and other file formats","archived":false,"fork":false,"pushed_at":"2022-12-29T02:21:08.000Z","size":1148,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-12T17:05:50.560Z","etag":null,"topics":["csv","export","react","typescript"],"latest_commit_sha":null,"homepage":"https://etr2460.github.io/export-data/","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/etr2460.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}},"created_at":"2022-12-27T03:06:33.000Z","updated_at":"2023-07-31T23:19:55.000Z","dependencies_parsed_at":"2023-01-11T16:01:34.372Z","dependency_job_id":null,"html_url":"https://github.com/etr2460/export-data","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/etr2460/export-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etr2460%2Fexport-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etr2460%2Fexport-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etr2460%2Fexport-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etr2460%2Fexport-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etr2460","download_url":"https://codeload.github.com/etr2460/export-data/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etr2460%2Fexport-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33024904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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","export","react","typescript"],"created_at":"2024-10-08T04:21:59.256Z","updated_at":"2026-05-14T12:31:42.962Z","avatar_url":"https://github.com/etr2460.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# export-data\n\n\u003cspan class=\"badge-npmversion\"\u003e\u003ca href=\"https://npmjs.org/package/export-data\" title=\"View this project on NPM\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/export-data.svg\" alt=\"NPM version\" /\u003e\u003c/a\u003e\u003c/span\u003e\n\nExport data in React to CSV and other file formats\n\n## Docs\n\n### FileDownloadLink\n\n#### Example\n\n```typescript\n\u003cFileDownloadLink\n  fileType=\"CSV\"\n  filename=\"fruits\"\n  data={{\n    columnNames: [\"Fruit\", \"Price\"],\n    rows: [\n      [\"Apple\", 1],\n      [\"Watermelon\", 5],\n      [\"Durian\", 10],\n    ],\n  }}\n\u003e\n  Download data\n\u003c/FileDownloadLink\u003e\n```\n\n#### Props\n\n```typescript\nexport type FileDownloadLinkProps = {\n  /** The type of file to be exported. */\n  fileType: FileType;\n  /** The text encoding of the data, utf-8 by default. */\n  encoding?: string;\n  /** The data to download. Can be null if the data is set in onClick. */\n  data: FileDownloadLinkData;\n  /** The filename for the exported file. */\n  filename?: string;\n  /** A function to be called when the link is clicked before the data is downloaded.\n   *  If this function modifies the data to be downloaded, then you must set\n   *  setsDataAsyncInOnClick to true.\n   */\n  onClick?: (e: React.MouseEvent\u003cHTMLAnchorElement\u003e) =\u003e void;\n  /** If the data is set asynchronously in onClick, then this must be set to true.\n   *  Setting this to true will result in an automatic download of data at the next time\n   *  the data changes.\n   */\n  setsDataAsyncInOnClick?: boolean;\n  /** The content for rendering the link. */\n  children: React.ReactNode;\n};\n\nexport type FileDownloadLinkData = {\n  columnNames: (string | number)[];\n  rows: (string | number)[][];\n} | null;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetr2460%2Fexport-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetr2460%2Fexport-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetr2460%2Fexport-data/lists"}