Turf.js | Advanced Geospatial Analysis
npm install @turf/clean-coords Tesselates a Feature into a FeatureCollection of triangles using earcut. Arguments Takes a feature or set of features and returns all positions as points. Arguments Throws Error - if it encounters an unknown geometry type npm install @turf/polygonize Takes a linestring , multi-linestring , multi-polygon or polygon and returns points at all self-intersections.
http://turfjs.org/docs/#lineIntersect