Skip to content
/ EnumJS Public

A simple way to create an immutable enumerable list aka enum

License

Notifications You must be signed in to change notification settings

ashwell/EnumJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EnumJS

A simple way to create an immutable list of enums in ES5. Still a WIP use at your own risk

Usage

NodeJS

var Enum = require('Enum').Enum;

var myEnumFromAry = new Enum(['one', 'two', 'three']);
OR
var myEnumFromObj = new Enum({one:1, two:2, three:3});

ES5 Compatible Browsers

// Enum will exist on the window object after the script is loaded
var myEnumFromAry = new Enum(['one', 'two', 'three']);
OR
var myEnumFromObj = new Enum({one:1, two:2, three:3});

Come back for more updates!

Code Climate

About

A simple way to create an immutable enumerable list aka enum

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published