{"id":13451805,"url":"https://github.com/4Catalyzer/babel-plugin-dev-expression","last_synced_at":"2025-03-23T19:32:47.762Z","repository":{"id":38375702,"uuid":"45416215","full_name":"4Catalyzer/babel-plugin-dev-expression","owner":"4Catalyzer","description":"A mirror of Facebook's dev-expression Babel plugin","archived":false,"fork":false,"pushed_at":"2025-03-03T02:17:12.000Z","size":327,"stargazers_count":186,"open_issues_count":24,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-17T05:04:35.698Z","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/4Catalyzer.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":"2015-11-02T19:17:35.000Z","updated_at":"2025-03-13T17:01:23.000Z","dependencies_parsed_at":"2023-12-10T12:26:28.654Z","dependency_job_id":"ddcac669-4889-4e63-bb9a-0e59554a7ac9","html_url":"https://github.com/4Catalyzer/babel-plugin-dev-expression","commit_stats":{"total_commits":51,"total_committers":9,"mean_commits":5.666666666666667,"dds":0.7058823529411764,"last_synced_commit":"e2b80242c16db76713e3e8a1d73613780c57c2f7"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4Catalyzer%2Fbabel-plugin-dev-expression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4Catalyzer%2Fbabel-plugin-dev-expression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4Catalyzer%2Fbabel-plugin-dev-expression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4Catalyzer%2Fbabel-plugin-dev-expression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4Catalyzer","download_url":"https://codeload.github.com/4Catalyzer/babel-plugin-dev-expression/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245158365,"owners_count":20570171,"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-07-31T07:01:03.161Z","updated_at":"2025-03-23T19:32:47.420Z","avatar_url":"https://github.com/4Catalyzer.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# babel-plugin-dev-expression [![npm version](https://badge.fury.io/js/babel-plugin-dev-expression.svg)](https://badge.fury.io/js/babel-plugin-dev-expression)\n\nA mirror of Facebook's dev-expression Babel plugin.\n\nThis plugin reduces or eliminates development checks from production code.\n\n## `__DEV__`\n\nReplaces\n\n```js\n__DEV__\n```\n\nwith\n\n```js\nprocess.env.NODE_ENV !== 'production'\n```\n\n**Note:** The `dev-expression` transform does not run when `NODE_ENV` is `test`. As such, if you use `__DEV__`, you will need to define it as a global constant in your test environment.\n\n## `invariant`\n\nReplaces\n\n```js\ninvariant(condition, argument, argument);\n```\n\nwith\n\n```js\nif (!condition) {\n  if (\"production\" !== process.env.NODE_ENV) {\n    invariant(false, argument, argument);\n  } else {\n    invariant(false);\n  }\n}\n```\n\nRecommended for use with https://github.com/zertosh/invariant or smaller https://github.com/alexreardon/tiny-invariant.\n\n## `warning`\n\nReplaces\n\n```js\nwarning(condition, argument, argument);\n```\n\nwith\n\n```js\nif (\"production\" !== process.env.NODE_ENV) {\n  warning(condition, argument, argument);\n}\n```\n\nRecommended for use with https://github.com/r3dm/warning or smaller https://github.com/alexreardon/tiny-warning.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4Catalyzer%2Fbabel-plugin-dev-expression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4Catalyzer%2Fbabel-plugin-dev-expression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4Catalyzer%2Fbabel-plugin-dev-expression/lists"}