code: function NodeSearchState(node) {
    this.node = node;
  
    // How we came to this node?
    this.parent = null;
  
    this.closed = false;
    this.open = 0;
  
    this.distanceToSource = Number.POSITIVE_INFINITY;
    // the f(n) = g(n) + h(n) value
    this.fScore = Number.POSITIVE_INFINITY;
  
    // used to reconstruct heap when fScore is updated.
    this.heapIndex = -1;
  }
docs: This class represents a single search node in the exploration tree for
  A* algorithm.
  
  @param {Object} node  original node in the graph