code: function boolIntersects(coords1,coords2) {
      
    
      // if (coords1.length !== 2)throw new Error("<intersects> line1 must only contain 2 coordinates");
      // if (coords2.length !== 2)throw new Error("<intersects> line2 must only contain 2 coordinates");
      const x1 = coords1[0][0];
      const y1 = coords1[0][1];
      const x2 = coords1[1][0];
      const y2 = coords1[1][1];
      const x3 = coords2[0][0];
      const y3 = coords2[0][1];
      const x4 = coords2[1][0];
      const y4 = coords2[1][1];
      const denom = ((y4 - y3) * (x2 - x1)) - ((x4 - x3) * (y2 - y1));
      const numeA = ((x4 - x3) * (y1 - y3)) - ((y4 - y3) * (x1 - x3));
      const numeB = ((x2 - x1) * (y1 - y3)) - ((y2 - y1) * (x1 - x3));
  
      if (denom === 0) return null;
      
      const uA = numeA / denom;
      const uB = numeB / denom;
  
      if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1)return true;
      return null;
  }
docs: https://github.com/Turfjs/turf/blob/master/packages/turf-line-intersect/index.ts