ringo/ringojs — Issue #171: allow module.singleton(id, object)
Author: oberhamsi
Created: 2012-02-17 10:48:34+00:00
State: open

would be convenient if module.singleton() allowed me to pass an object as 2nd argument, not only a function.

currently i have to write:

module.singleton("foo", function() { return {"bar": "baz"}; })

when i mean to say:

module.singleton("foo", {"bar": "baz"})