open-index/open-npm huggingface dataset:
npm package: @furdarius/enumy
Description: Enum is a javascript module that introduces the Enum Type. It works for node.js and in the browser.
Author: furdarius
Latest version: 1.0.4

# Enumy
Tiny javascript library that introduces basic Enum functionality

# Usage

````js
// Include library
var enumy = require('enumy');

// Create enum object
var types = enumy(['Integer', 'Boolean', 'String', 'Array', 'Html']);
/*
    Integer = 1
    Boolean = 2
    ...
*/


// Use it
var htmlEnum = types.Html;

if (htmlEnum === types.Html) {
    // ...
}

alert(types[htmlEnum])
// Output: Html

var listOfEnums = types.getList();
// Array: ['Integer', 'Boolean', 'String', 'Array', 'Html']
````