I'm not sure I understand the case for string constants as event names.  Seems 
like something else to manage and you still need to choose a static name for 
the constant -- what's the net gain?  Are you trying to share a library across 
envts where the underlying event name will change?

In any case, your problem isn't really Moo, it's JS.  You can't use variables 
on the left-hand-side of object literals.  You can instead use brackets var 
oOpts = {}; opts['on'+EVENT_NAME] = ...; and then pass oOpts as your options.

-- S.

Reply via email to