# babel-plugin-proposal-enum

> Enums

Latest version **7.0.0-beta.47** (published 2018-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-proposal-enum
pnpm add babel-plugin-proposal-enum
yarn add babel-plugin-proposal-enum
bun add babel-plugin-proposal-enum
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 7.0.0-beta.47 |
| Published | 2018-07-21 |
| First published | 2018-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 43992 |
| Maintainers | douglas.wade |
| Keywords | babel-plugin |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-proposal-enum
- Repository: https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-enum
- npm.io page: https://npm.io/package/babel-plugin-proposal-enum

## Dependencies (2)

- [@babel/plugin-syntax-enum](https://npm.io/package/@babel/plugin-syntax-enum.md) 7.0.0-beta.47
- [@babel/helper-plugin-utils](https://npm.io/package/@babel/helper-plugin-utils.md) 7.0.0-beta.47

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 7.0.0-beta.47 (latest) — 2018-07-21

## README

# @babel/plugin-proposal-nullish-coalescing-operator

> Replace `enum` with a [polyfill helper](https://github.com/doug-wade/enum-polyfill).

## Example

**In**

```javascript
enum MetasyntacticVariables {
  FOO,
  BAR = 'BAR',
  BAZ
}
```

**Out**

```javascript
var MetasyntacticVariables = PolyfilledEnum({
  FOO: PolyfilledEnumEmptyValue,
  BAR: 'BAR',
  BAZ: PolyfilledEnumEmptyValue
});
```

## Installation

```sh
npm install --save-dev @babel/plugin-proposal-enum
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "plugins": ["@babel/plugin-proposal-enum"]
}
```

### Via CLI

```sh
babel --plugins @babel/plugin-proposal-enum script.js
```

### Via Node API

```javascript
require("@babel/core").transform("code", {
  plugins: ["@babel/plugin-proposal-enum"]
});
```

## References

* [Proposal: Enums](https://github.com/doug-wade/proposal-enum-definitions)

---
_Source: https://npm.io/package/babel-plugin-proposal-enum · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
