{"id":25835998,"url":"https://github.com/bugsplat-git/my-javascript-crasher","last_synced_at":"2025-10-11T19:03:40.816Z","repository":{"id":70064485,"uuid":"101424837","full_name":"BugSplat-Git/my-javascript-crasher","owner":"BugSplat-Git","description":"Crush your JavaScript bugs by following the example in this repo","archived":false,"fork":false,"pushed_at":"2024-12-06T00:23:47.000Z","size":341,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-01T01:38:47.236Z","etag":null,"topics":["browser","bugsplat","error","esmodules","javascript","js","reporting","web"],"latest_commit_sha":null,"homepage":"https://docs.bugsplat.com/introduction/getting-started/integrations/web/javascript","language":"HTML","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/BugSplat-Git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-08-25T17:01:46.000Z","updated_at":"2024-12-06T00:23:51.000Z","dependencies_parsed_at":"2024-02-23T18:23:13.116Z","dependency_job_id":"4b277456-a208-449b-a436-ecdde78991cf","html_url":"https://github.com/BugSplat-Git/my-javascript-crasher","commit_stats":null,"previous_names":["bugsplat-git/myjavascriptcrasher"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/BugSplat-Git/my-javascript-crasher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fmy-javascript-crasher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fmy-javascript-crasher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fmy-javascript-crasher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fmy-javascript-crasher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BugSplat-Git","download_url":"https://codeload.github.com/BugSplat-Git/my-javascript-crasher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fmy-javascript-crasher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008439,"owners_count":26084459,"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-10-11T02:00:06.511Z","response_time":55,"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":["browser","bugsplat","error","esmodules","javascript","js","reporting","web"],"created_at":"2025-03-01T01:38:49.017Z","updated_at":"2025-10-11T19:03:40.773Z","avatar_url":"https://github.com/BugSplat-Git.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![bugsplat-github-banner-basic-outline](https://user-images.githubusercontent.com/20464226/149019306-3186103c-5315-4dad-a499-4fd1df408475.png)](https://bugsplat.com)\n\u003cbr/\u003e\n# \u003cdiv align=\"center\"\u003eBugSplat\u003c/div\u003e \n### **\u003cdiv align=\"center\"\u003eCrash and error reporting built for web developers.\u003c/div\u003e**\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://twitter.com/BugSplatCo\"\u003e\n        \u003cimg alt=\"Follow @bugsplatco on Twitter\" src=\"https://img.shields.io/twitter/follow/bugsplatco?label=Follow%20BugSplat\u0026style=social\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/K4KjjRV5ve\"\u003e\n        \u003cimg alt=\"Join BugSplat on Discord\" src=\"https://img.shields.io/discord/664965194799251487?label=Join%20Discord\u0026logo=Discord\u0026style=social\"\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n# my-javascript-crasher\n\nThis sample project demonstrates how to use the [bugsplat](https://github.com/BugSplat-Git/bugsplat-js) package to report JavaScript errors in web applications. Before continuing with the tutorial please make sure you have completed the following checklist:\n\n* [Sign Up](https://app.bugsplat.com/v2/sign-up) as a new BugSplat user.\n* [Log In](https://app.bugsplat.com/cognito/login) using your email address.\n\n## ⚙️ Integrating\n\nImport [bugsplat](https://github.com/BugSplat-Git/bugsplat-js) from [esm.sh](https://esm.sh)\n\n```html\n\u003cscript type=\"module\"\u003e\n    import { BugSplat } from 'https://esm.sh/bugsplat@8.0.1';\n\u003c/script\u003e\n```\n\nCreate a new instance of BugSplat with your database, application, and version\n\n```javascript\nconst bugsplat = new BugSplat('fred', 'my-javascript-crasher', '1.0.0');\n```\n\nConfigure bugsplat to listen to `window.onerror` and `window.onunhandledrejection` events\n\n```javascript\nwindow.onerror = function (message, source, lineno, colno, error) {\n    bugsplat.post(error);\n};\n\nwindow.addEventListener('unhandledrejection', function (event) {\n    bugsplat.post(event.reason);\n});\n```\n\nTrigger an error to see it reported in BugSplat\n\n```javascript\nthrow new Error('todo bg');\n```\n\n## 🧪 Sample\n\nClone the [my-javascript-crasher](https://github.com/BugSplat-Git/my-javascript-crasher) repository\n\n```sh\ngit clone https://github.com/BugSplat-Git/my-javascript-crasher\n```\n\nInstall the dependencies\n\n```sh\ncd my-javascript-crasher\nnpm i\n```\n\nStart the server\n\n```sh\nnpm start\n```\n\nOpen your browser and navigate to [http://localhost:8080](http://localhost:8080), then click the button to trigger an error.\n\n## 📈 Viewing Reports\n\nNavigate to the BugSplat [Crashes](https://app.bugsplat.com/v2/crashes?database=Fred\u0026c0=appName\u0026f0=CONTAINS\u0026v0=my-javascript-crasher) page to view your report.\n\n![Crashes page](https://github.com/BugSplat-Git/my-javascript-crasher/assets/2646053/af6950bb-530b-42da-8679-47f220f08a40)\n\nClick on the ID of the most recent error to view the details of your report.\n\n![Crash page](https://github.com/BugSplat-Git/my-javascript-crasher/assets/2646053/acc8fa5c-b93e-4037-a72e-ea39f3437b8e)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugsplat-git%2Fmy-javascript-crasher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugsplat-git%2Fmy-javascript-crasher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugsplat-git%2Fmy-javascript-crasher/lists"}