Bad triangulation in shape with duplicate vertices
I have data sets that can contain duplicate vertices.
In this case the holes aren't handled correctly.
When I remove the duplicate vertices the holes are handled correctly.

It is possible to solve this by filtering out the duplicate vertices, but in some cases it would be useful to have the triangulation match the data set. (issue might be related to #52)
I've created an ESbin with example code
I think the work about Cleaning & Simplify is not earcut's job. If we can't ensure the polygon is a correct simple polygon , we could use other tools (e.g. jsclipper ) to do Cleaning & Simplify. If earcut do too many works , the size & performance will be bad.
(Sorry , my english is very bad , I hope you could understand me )