# enumy

> A tiny npm module that enables creation of enums.

Latest version **1.0.1** (published 2015-02-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install enumy
pnpm add enumy
yarn add enumy
bun add enumy
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-02-09 |
| First published | 2015-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Benjamin Kovach |
| Maintainers | south |
| Keywords | enum |

## Links

- npm: https://www.npmjs.com/package/enumy
- Repository: https://github.com/5outh/enumy
- Issues: https://github.com/5outh/enumy/issues
- npm.io page: https://npm.io/package/enumy

## Recent versions

- 1.0.1 (latest) — 2015-02-09
- 1.0.0 — 2015-02-09

## README

# enumy

A tiny npm module for creating basic enumerables.

### Usage

```js
var enumy = require('enumy');

var Planets = enumy(
    'PLANET_MERCURY',
    'PLANET_VENUS',
    'PLANET_EARTH',
    'PLANET_MARS',
    'PLANET_JUPITER',
    'PLANET_SATURN',
    'PLANET_URANUS',
    'PLANET_NEPTUNE'
);

console.log(Planets.PLANET_MERCURY);
// #=> 'PLANET_MERCURY'
```

A common pattern is to expose an enum as a module. To do this, just tack on:

```js
module.exports = Planets
```

to the above file, then you can `require('./path/to/Planets.js')` and use the enum wherever you'd like.

That's it!

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