code: function renderNamespace(str) {
  
    var parts = [];
    var split = str.split('.');
    var len = split.length;
  
    return str.split('.').map(function(part, i) {
      parts.push(part);
      part = parts.join('.');
      return (i ? '' : 'window.') + part + ' = window.' + part + ' || {};';
    }).join('\n');
  }
docs: Render a namespace from the given `str`.
  
  Examples:
  
  renderNamespace('foo.bar.baz');
  
  var foo = foo || {};
  foo.bar = foo.bar || {};
  foo.bar.baz = foo.bar.baz || {};
  
  @param {String} str
  @return {String}
  @api private