code: function toAbsoluteLinks(data, originUrl) {
  
          var host = getHost(stripTrailingSlash(originUrl));
  
          function prefixLinks(links) {
              if (host) {
                  angular.forEach(links, function (linkValue, linkKey) {
                      if (linkValue.href.charAt(0) === '/') {
                          linkValue.href = host + linkValue.href;
                          links[linkKey] = linkValue;
                      }
                  });
              }
          }
  
          function walkTree(node, action) {
  
              action(node[config.linksKey]);
  
              angular.forEach(node[config.embeddedKey], function (embedded) {
                  if (embedded instanceof Array) {
                      angular.forEach(embedded, function (embeddedItem) {
                          walkTree(embeddedItem, action);
                      });
  
                  } else {
                      walkTree(embedded, action);
  
                  }
              });
          }
  
          walkTree(data, prefixLinks);
  
      }
docs: /*
  Prefix the links in the data structure with a host prefix
  
  @param data the original data structure
  @param originUrl the url from which the data originated