lib/collections/Heap.js
function () {
            var heap = this.__heap,
                l = heap.length,
                ret;
            if (l) {
                ret = heap[0];
                if (l === 1) {
                    heap.length = 0;
                } else {
                    heap[0] = heap.pop();
                    this.__downHeap(0);
                }
            }
            return ret ? ret.value : ret;
        }
function () {
            var heap = this.__heap,
                l = heap.length,
                ret;
            if (l) {
                ret = heap[0];
                if (l === 1) {
                    heap.length = 0;
                } else {
                    heap[0] = heap.pop();
                    this.__downHeap(0);
                }
            }
            return ret ? ret.value : ret;
        }
function ( ) { var heap = this . __heap , l = heap . length , ret ; if ( l ) { ret = heap [ 0 ] ; if ( l === 1 ) { heap . length = 0 ; } else { heap [ 0 ] = heap . pop ( ) ; this . __downHeap ( 0 ) ; } } return ret ? ret . value : ret ; }
Removes the root from the heap

@returns the value of the root
Removes the root from the heap