measure javascript cyclomatic complexity with yardstick!

and filter the output to only CCN, hide other metrics from yardstick
(not that they're not useful)
Create a global namespace only if not already defined.

See also

http://stackoverflow.com/questions/4401323/javascript-best-practice-define-variable-namespace-check-is-not-already-define

and

http://stackoverflow.com/questions/2647867/how-to-determine-if-variable-is-undefined-or-null