function consume(compare, heap) {
  var l = heap.length,
      i = 0;

  var array = new Array(l);

  while (i < l)
    array[i++] = pop(compare, heap);

  return array;
}
Fully consumes the given heap.

@param  {function} compare - Comparison function.
@param  {array}    heap    - Array storing the heap's data.
@return {array}