A simple enum implementation for JavaScript
JavaScript
Switch branches/tags
Nothing to show
Latest commit 76eeb52 Nov 23, 2013 @rauschma rauschma Added a license.

README

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