{"id":19505921,"url":"https://github.com/morlay/babel-plugin-typescript-iife-enum","last_synced_at":"2025-04-26T02:32:11.446Z","repository":{"id":40790769,"uuid":"163825997","full_name":"morlay/babel-plugin-typescript-iife-enum","owner":"morlay","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-28T08:45:20.000Z","size":162,"stargazers_count":9,"open_issues_count":25,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-28T10:02:19.452Z","etag":null,"topics":["babel-plugin","enum","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/morlay.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}},"created_at":"2019-01-02T10:19:17.000Z","updated_at":"2023-08-24T01:34:39.000Z","dependencies_parsed_at":"2023-01-21T16:00:37.345Z","dependency_job_id":"76a2e23d-d995-4976-bf49-b76f365a2f98","html_url":"https://github.com/morlay/babel-plugin-typescript-iife-enum","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/morlay%2Fbabel-plugin-typescript-iife-enum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morlay%2Fbabel-plugin-typescript-iife-enum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morlay%2Fbabel-plugin-typescript-iife-enum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morlay%2Fbabel-plugin-typescript-iife-enum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morlay","download_url":"https://codeload.github.com/morlay/babel-plugin-typescript-iife-enum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250922127,"owners_count":21508279,"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":["babel-plugin","enum","typescript"],"created_at":"2024-11-10T22:34:56.424Z","updated_at":"2025-04-26T02:32:11.129Z","avatar_url":"https://github.com/morlay.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## babel-plugin-typescript-iife-enum\n\n[![Build Status](https://img.shields.io/travis/morlay/babel-plugin-typescript-iife-enum.svg?style=flat-square)](https://travis-ci.org/morlay/babel-plugin-typescript-iife-enum)\n[![NPM](https://img.shields.io/npm/v/babel-plugin-typescript-iife-enum.svg?style=flat-square)](https://npmjs.org/package/babel-plugin-typescript-iife-enum)\n[![Dependencies](https://img.shields.io/david/morlay/babel-plugin-typescript-iife-enum.svg?style=flat-square)](https://david-dm.org/morlay/babel-plugin-typescript-iife-enum)\n[![License](https://img.shields.io/npm/l/babel-plugin-typescript-iife-enum.svg?style=flat-square)](https://npmjs.org/package/babel-plugin-typescript-iife-enum)\n\n### Purpose\n\nA TypeScript transform to wrapper enum in IIFE.\n\n### Purpose\n\nFor now TypeScript will transform enum from\n\n```ts\nenum Test {\n    Key = 1\n}\n```\nto\n\n```ts\nvar Test;\n(function (Test) {\n    Test[Test[\"Key\"] = 1] = \"Key\";\n})(Test || (Test = {}));\n```\n\nThis result is not friendly for uglyify.\n\nSo just wrapper IIFE for enum\n\n```\nconst Test = (() =\u003e {\n    enum Test {\n        Key = 1\n    }\n  \n    return Test\n})\n```\n\n## Notice\n\nmust put this plugin before `@babel/plugin-transform-typescript`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorlay%2Fbabel-plugin-typescript-iife-enum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorlay%2Fbabel-plugin-typescript-iife-enum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorlay%2Fbabel-plugin-typescript-iife-enum/lists"}