{"id":25044679,"url":"https://github.com/blad/rebote","last_synced_at":"2025-03-30T23:44:44.262Z","repository":{"id":57349083,"uuid":"163553421","full_name":"blad/rebote","owner":"blad","description":"Javascript Utility to Deal with Caught Errors","archived":false,"fork":false,"pushed_at":"2019-07-20T19:56:17.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T08:46:31.070Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/blad.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":"2018-12-30T01:35:28.000Z","updated_at":"2019-08-21T20:47:31.000Z","dependencies_parsed_at":"2022-08-25T19:40:51.563Z","dependency_job_id":null,"html_url":"https://github.com/blad/rebote","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blad%2Frebote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blad%2Frebote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blad%2Frebote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blad%2Frebote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blad","download_url":"https://codeload.github.com/blad/rebote/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246395572,"owners_count":20770240,"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":[],"created_at":"2025-02-06T05:19:00.992Z","updated_at":"2025-03-30T23:44:44.240Z","avatar_url":"https://github.com/blad.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rebote\n\n_Rebote_ is a simple that checks whether an error is one of the standard \nJavascript errors and rethrows it. _Rebote_ is the spanish word for \n[_bounce_](#inspiration).\n\n```bash\nnpm install rebote --save\n\n# OR:\n\nyarn add rebote\n```\n\nExample usage:\n\n```javascript\nimport rebote from \"rebote\";\n\ntry {\n  const response = await someAsyncFunction();\n} catch (e) {\n  // This line rethrows any of the standard JS errors\n  // which are otherwise silenced due to the try catch.\n  rebote.rethrow(e);\n}\n```\n\nThe standard Javascript errors rethrown are:\n\n- EvalError\n- RangeError\n- ReferenceError\n- SyntaxError\n- TypeError\n- URIError\n\n## API\n\n### rebote.rethrow(error, type)\n- `error` is the cought error that should be checked and potentially rethrown.\n- `type` is any of `native`, `any`, `all`. Default: `native`.\n  - `native` - rethrows only the standard JS errors listed above.\n  - `any`, `all` - rethrow all errors regardless of type.\n\n## Inspiration\n\nThis library was inspired by [bouce](https://www.npmjs.com/package/bounce). However, \n`bounce` has additional dependencies on [hoek](https://www.npmjs.com/package/hoek) \nand [boom](https://www.npmjs.com/package/boom) which are related to node's \n[hapi](https://www.npmjs.com/package/hapi) which may contain code mean for node and \nnot the browser.\n\nRebote aims to be free of platform specific dependencies and usable in both node and \njavascript in the the browser (after being bundled.)\n\n## License: MIT\n```\nCopyright 2018 Bladymir Tellez\u003cbtellez@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of \nthis software and associated documentation files (the \"Software\"), to deal in \nthe Software without restriction, including without limitation the rights to \nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies \nof the Software, and to permit persons to whom the Software is furnished to do \nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all \ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE \nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblad%2Frebote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblad%2Frebote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblad%2Frebote/lists"}