{"id":28301996,"url":"https://github.com/bootstarted/bugnet","last_synced_at":"2025-06-13T12:31:07.354Z","repository":{"id":57191111,"uuid":"65767030","full_name":"bootstarted/bugnet","owner":"bootstarted","description":"Capture Javascript errors.","archived":false,"fork":false,"pushed_at":"2018-03-06T19:51:31.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-31T03:50:52.521Z","etag":null,"topics":["bootstart","error-handling","metalab"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/bootstarted.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}},"created_at":"2016-08-15T21:44:01.000Z","updated_at":"2020-05-04T09:08:35.000Z","dependencies_parsed_at":"2022-09-15T22:22:53.298Z","dependency_job_id":null,"html_url":"https://github.com/bootstarted/bugnet","commit_stats":null,"previous_names":["metalabdesign/bugnet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bootstarted/bugnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootstarted%2Fbugnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootstarted%2Fbugnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootstarted%2Fbugnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootstarted%2Fbugnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bootstarted","download_url":"https://codeload.github.com/bootstarted/bugnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootstarted%2Fbugnet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259644820,"owners_count":22889481,"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":["bootstart","error-handling","metalab"],"created_at":"2025-05-23T20:13:29.109Z","updated_at":"2025-06-13T12:31:07.325Z","avatar_url":"https://github.com/bootstarted.png","language":"JavaScript","readme":"# bugnet\n\nCapture Javascript errors. Minimal version of [rollbar], [bugsnag], etc.\n\n![build status](http://img.shields.io/travis/metalabdesign/bugnet/master.svg?style=flat)\n![coverage](http://img.shields.io/coveralls/metalabdesign/bugnet/master.svg?style=flat)\n![license](http://img.shields.io/npm/l/bugnet.svg?style=flat)\n![version](http://img.shields.io/npm/v/bugnet.svg?style=flat)\n![downloads](http://img.shields.io/npm/dm/bugnet.svg?style=flat)\n\n## Usage\n\nSimply pass the function you wish to use for being notified of errors. As soon as you include `bugnet` in your application errors will start to be captured and buffered until they're ready to be consumed later. It is recommended you include `bugnet` as soon as possible in your application.\n\nImportantly `bugnet` will **NOT** squelch your application errors (i.e. not a silent `catch`-all) - it simply monitors them.\n\n```sh\nnpm install --save bugnet\n```\n\n```javascript\nimport capture from 'bugnet';\n\ncapture((error) =\u003e {\n\t// ...\n});\n```\n\n### Examples\n\n#### Browser\n\nSend browser errors to an off-site logger:\n\n```javascript\nimport capture from 'bugnet';\n\n// Add event handler.\ncapture((error) =\u003e {\n\tconst request = new XMLHttpRequest();\n\trequest.open('http://errors.myapp.com/', 'POST', true);\n\trequest.send(JSON.stringify(event));\n});\n```\n\n#### Node\n\nSend node.js errors to the console:\n\n```javascript\n// example.js\nimport capture from 'bugnet';\n\n// Add event handler.\ncapture((error) =\u003e {\n\tconsole.log('Got error', error);\n});\n```\n\nTo start capturing errors at the earliest possible point, load `bugnet` from `node` itself.\n\n```sh\n#!/bin/sh\nnode -r bugnet ./example.js\n```\n\n## TODO:\n\n * Testing\n * Fix incompatibilities using `Object.*` methods\n\n[rollbar]: https://rollbar.com/\n[bugsnag]: https://bugsnag.com/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbootstarted%2Fbugnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbootstarted%2Fbugnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbootstarted%2Fbugnet/lists"}