const Heap = require('heap');

var heap = new Heap(function(a, b) {
    return a.foo - b.foo;
});
let map = new Map();
// a = {foo : 3};
// b = {foo : 4};
// c = {foo : 2};
arr = [{foo : 4},{foo : 5},{foo : 2}]
// map.set("foo1", a);
// map.set("foo2", b);
// map.set("foo3", c);
// heap.push({foo: 3});
// heap.push({foo: 1});
// heap.push({foo: 2});
heap.push(arr[0]);
console.log(heap)
heap.push(arr[1]);
console.log(heap)
heap.push(arr[2]);
console.log(heap)
arr[0].foo = 1;
// heap.pop(b);
console.log(heap)
heap.updateItem(arr[0])
console.log(heap)
heap.pop();
console.log(heap)
