docs: function addRedirects(metaObj, uri) {
    const { urlHistory } = metaObj;
  
    if (urlHistory.length > 1) {
      // there are old urls! redirect the previous url to latest url
      let prevUrl = parse(urlHistory[urlHistory.length - 2]),
        prevUri = `${prevUrl.hostname}${prevUrl.pathname}`,
        newUrl = parse(_.last(urlHistory)),
        newUri = `${newUrl.hostname}${newUrl.pathname}`,
        prefix = getPrefix(uri);
  
      // update the previous uri to point to the latest uri
      return db.put(`${prefix}/_uris/${buf.encode(prevUri)}`, `${prefix}/_uris/${buf.encode(newUri)}`)
        .then(() => metaObj);
    }
  
    return metaObj;
  }