How to find if the point is in the polygon in d3.js


I know there are manual ways of doing this (see Point in Polygon), but is there a native way of determining whether a point is inside a polygon, in d3.js?

Here's an implementation, in case you'd rather not roll your own. Demo here.