How to namespace Javascript

Jumpino 2.0 will have a much larger client (written in JS) that will facilitate many many features currently not available in 1.0. So clearly, I’ll need a way to organize application code. So after checking out some JS namespacing methods on StackOverflow, I made my own:

And here’s an example that can be generalized:

I like the way the syntax looks and I like how ambiguous members are caught. What I do not like is how scoped methods/members are defined. namespace.Func = function() {} is kind of lame.

I’m not sure if I’ll settle with this but it’s a pretty decent paradigm.