code: function sortFeatures(features) {
    return features.map(feature => {
      if (feature.geometry.type === Constants.geojsonTypes.POLYGON) {
        feature.area = area.geometry({
          type: Constants.geojsonTypes.FEATURE,
          property: {},
          geometry: feature.geometry
        });
      }
      return feature;
    }).sort(comparator).map(feature => {
      delete feature.area;
      return feature;
    });
  }
docs: Sort in the order above, then sort polygons by area ascending.