code: function process(segments, parent) {
    var last = segments.pop();
    if (last) {
      parent[last] = parent[last] || {};
      process(segments, parent[last]);
    } else {
      parent[true] = true;
    }
  }
docs: Recursively parse an array of domain segments into a tree structure.
  
  @param  {Array}  segments List of domain segments ordered sub to top.
  @param  {Object} parent   Resulting tree object.