{"id":14155940,"url":"https://github.com/wobsoriano/bun-plugin-csv","last_synced_at":"2025-04-15T02:18:37.248Z","repository":{"id":193805163,"uuid":"673681206","full_name":"wobsoriano/bun-plugin-csv","owner":"wobsoriano","description":"A Bun plugin which converts .csv and .tsv files into JavaScript modules.","archived":false,"fork":false,"pushed_at":"2024-11-12T14:50:04.000Z","size":133,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T14:05:25.884Z","etag":null,"topics":["bun","csv"],"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/wobsoriano.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-08-02T07:23:25.000Z","updated_at":"2025-02-21T18:59:25.000Z","dependencies_parsed_at":"2024-08-17T08:16:47.295Z","dependency_job_id":null,"html_url":"https://github.com/wobsoriano/bun-plugin-csv","commit_stats":null,"previous_names":["wobsoriano/bun-plugin-csv"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Fbun-plugin-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Fbun-plugin-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Fbun-plugin-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Fbun-plugin-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wobsoriano","download_url":"https://codeload.github.com/wobsoriano/bun-plugin-csv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248550634,"owners_count":21122933,"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":["bun","csv"],"created_at":"2024-08-17T08:05:06.218Z","updated_at":"2025-04-15T02:18:37.231Z","avatar_url":"https://github.com/wobsoriano.png","language":"TypeScript","funding_links":[],"categories":["csv"],"sub_categories":[],"readme":"# bun-plugin-csv\n\nA Bun plugin which converts `.csv` and `.tsv` files into JavaScript modules.\n\n## Install\n\n```bash\nbun add bun-plugin-csv -d\n```\n\n## Bundler Usage\n\n```ts\nimport csv from 'bun-plugin-csv'\n\nawait Bun.build({\n  entrypoints: ['./src/index.ts'],\n  // other config\n\n  plugins: [csv()]\n})\n```\n\nSuppose that you have a CSV which contains some info:\n\n```csv\ntype,count\napples,7\npears,4\nbananas,5\n```\n\nThe import will provide an `Array` of `Objects` representing rows from the CSV file:\n\n```ts\nimport fruit from './fruit.csv';\n\nconsole.log(fruit);\n// [\n//   { type: 'apples', count: '7' },\n//   { type: 'pears', count: '4' },\n//   { type: 'bananas', count: '5' }\n// ]\n```\n\n## Runtime usage\n\nTo use as a runtime plugin, create a file that registers the plugin:\n\n```ts\nimport csv from 'bun-plugin-csv'\n\nBun.plugin(csv())\n```\n\nThen preload it in your `bunfig.toml`:\n\n```toml\npreload = ['./csv.ts']\n```\n\n## TypeScript Intellisense\n\nAdd the following to your `.d.ts` file:\n\n```ts\n/// \u003creference types=\"bun-plugin-csv/env\" /\u003e\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwobsoriano%2Fbun-plugin-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwobsoriano%2Fbun-plugin-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwobsoriano%2Fbun-plugin-csv/lists"}