prod/service-worker-28ddbc7ef7a575da0539a0f05f4bfdae.js
function traverseRevTree(revs, callback) {
  var toVisit = revs.slice();

  var node;
  while ((node = toVisit.pop())) {
    var pos = node.pos;
    var tree = node.ids;
    var branches = tree[2];
    var newCtx =
      callback(branches.length === 0, pos, tree[0], node.ctx, tree[1]);
    for (var i = 0, len = branches.length; i < len; i++) {
      toVisit.push({pos: pos + 1, ids: branches[i], ctx: newCtx});
    }
  }
}
function traverseRevTree(revs, callback) {
  var toVisit = revs.slice();

  var node;
  while ((node = toVisit.pop())) {
    var pos = node.pos;
    var tree = node.ids;
    var branches = tree[2];
    var newCtx =
      callback(branches.length === 0, pos, tree[0], node.ctx, tree[1]);
    for (var i = 0, len = branches.length; i < len; i++) {
      toVisit.push({pos: pos + 1, ids: branches[i], ctx: newCtx});
    }
  }
}
function traverseRevTree ( revs , callback ) { var toVisit = revs . slice ( ) ; var node ; while ( ( node = toVisit . pop ( ) ) ) { var pos = node . pos ; var tree = node . ids ; var branches = tree [ 2 ] ; var newCtx = callback ( branches . length === 0 , pos , tree [ 0 ] , node . ctx , tree [ 1 ] ) ; for ( var i = 0 , len = branches . length ; i < len ; i ++ ) { toVisit . push ( { pos : pos + 1 , ids : branches [ i ] , ctx : newCtx } ) ; } } }
Pretty much all below can be combined into a higher order function to traverse revisions The return value from the callback will be passed as context to all children of that node
Pretty much all below can be combined into a higher order function to traverse revisions The return value from the callback will be passed as context to all children of that node