Skip to content

rauschma/enums

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A simple enum implementation for JavaScript
===========================================

Usage example
-------------

    var color = new enums.Enum("red", "green", "blue");
    function isGreen(c) {
        return c === color.green;
    }
    
Details: http://www.2ality.com/2011/10/enums.html


Running the unit tests
----------------------

    $ jasmine-node enums.spec.js
    
Details: http://www.2ality.com/2011/10/jasmine.html


Acknowledgements
----------------

- Main idea by Allen Wirfs-Brock
- Suggested improvements by Andrea Gianmarchi

About

A simple enum implementation for JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published