code: function(ns, root){
      if (!ns) {
        return null;
      }
      var nsParts = ns.split(".");
      root = root || this;
      for (var i = 0, len = nsParts.length; i < len; i++) {
        if (typeof root[nsParts[i]] === "undefined") {
          root[nsParts[i]] = {};
        }
        root = root[nsParts[i]];
      }
      return root;
    }
docs: define a namespace object
  @param {Object} ns