{"id":15063502,"url":"https://github.com/skyksandr/babel-plugin-transform-catch","last_synced_at":"2026-01-02T10:47:58.784Z","repository":{"id":34643937,"uuid":"181720766","full_name":"skyksandr/babel-plugin-transform-catch","owner":"skyksandr","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-07T07:35:24.000Z","size":382,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T22:41:25.872Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skyksandr.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":"2019-04-16T15:49:07.000Z","updated_at":"2022-04-11T08:15:04.000Z","dependencies_parsed_at":"2023-01-15T08:17:14.596Z","dependency_job_id":null,"html_url":"https://github.com/skyksandr/babel-plugin-transform-catch","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/skyksandr%2Fbabel-plugin-transform-catch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyksandr%2Fbabel-plugin-transform-catch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyksandr%2Fbabel-plugin-transform-catch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyksandr%2Fbabel-plugin-transform-catch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyksandr","download_url":"https://codeload.github.com/skyksandr/babel-plugin-transform-catch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243658206,"owners_count":20326464,"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":"2024-09-25T00:03:23.505Z","updated_at":"2026-01-02T10:47:58.753Z","avatar_url":"https://github.com/skyksandr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Motivation\n\n`catch` in Google apps script is reserved word and this make it impossible to use\nwith promises. And while you can easily overcome it by not using promises which in\nfact absent in GAS environment the problem become hard to solve if your project\nrequires 3rd-party library. In example `jsonwebtoken`, which dependent on another\nlibrary, which has `.catch` in its code.\n\nAt the end of the day it become simpler to roll-out babel transformation than any\nother option.\n\n## Example\n\n**In**\n\n```js\nperformRequest.then(doSomething).catch(function() { handler() });\n```\n\n**Out**\n\n```js\n\nperformRequest.then(doSomething)[\"catch\"](function () {\n  handler();\n});\n```\n\n## Installation\n\n```sh\n$ npm install babel-plugin-transform-catch\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```json\n{\n  \"plugins\": [\"babel-plugin-transform-catch\"]\n}\n```\n\n### Via CLI\n\n```sh\n$ babel --plugins babel-plugin-transform-catch script.js\n```\n\n### Via Node API\n\n```javascript\nrequire(\"babel-core\").transform(\"code\", {\n  plugins: [\"babel-plugin-transform-catch\"]\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyksandr%2Fbabel-plugin-transform-catch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyksandr%2Fbabel-plugin-transform-catch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyksandr%2Fbabel-plugin-transform-catch/lists"}