So to create simple polygons from a complex polygon (self-intersecting), is to use `turf.unkink()` for Javascript turf.js

Example code below.

**NOTE:** The area is calculated in Cartesian form, as `turf.area` gives different area.

    const line_non_simple = turf.polygon([some_intersecting_polygon_coords])
    
    var result = turf.unkinkPolygon(line_non_simple);
    
    var A_modelArea = []
    
    function findModelArea(multiCoords){
      //Split multicoords to x, y 
      var xNew = []
      var yNew = []
      for(var i = 0; i < multiCoords.length; i++ ){
        xNew.push(multiCoords[i][0]);
        yNew.push(multiCoords[i][1])
      }
      //Finds the area using the x, y
      var avg_sum = []
      for(var i = 0; i < multiCoords.length -1; i++ ){
        avg_sum.push(xNew[i]*yNew[i+1]-xNew[i+1]*yNew[i])
      }
      var avg_area = Math.abs(0.5*(avg_sum.reduce((a, b) => a + b)))
    
      A_modelArea.push(avg_area);
    }
    
    result.features.map(i => findModelArea(i.geometry.coordinates[0]))
    
    console.log(A_modelArea.reduce((a, b) => a + b))