In database world enums are uint/ushort (up to 0xFFFF) and two enums may conflicts due same order but this has never been a problem.
var Enum = (function () { "use strict"; function assign(name, i) { this[name] = i + 1; } var forEach = [].forEach, freeze = Object.freeze || function(o){return o} ; return function Enum() { forEach.call(arguments, assign, this); return freeze(this); }; }()); var colors = new Enum("red", "green", "blue"); Hope it was useful. Best Regards, Andrea Giammarchi
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss