code: function compareNumericField(field, a, b) {
      var nodeA = (a[1]);
      var nodeB = (b[1]);
      return nodeA[field] - nodeB[field];
    }
docs: these functions adjusted to handle Map entries() rather than objects