index.js
function (point, geopoly) {
  var inside = 0;

  if(geopoly.type !== "Polygon" && geopoly.type !== "MultiPolygon") return false;

  var shape = geopoly.type === 'Polygon' ? [geopoly.coordinates] : geopoly.coordinates;
  shape.forEach(function (polygon) {
    polygon.forEach(function (ring) {
      if(pip([point.longitude, point.latitude], ring)) inside++;
    });
  });
  return inside % 2;
}
function (point, geopoly) {
  var inside = 0;

  if(geopoly.type !== "Polygon" && geopoly.type !== "MultiPolygon") return false;

  var shape = geopoly.type === 'Polygon' ? [geopoly.coordinates] : geopoly.coordinates;
  shape.forEach(function (polygon) {
    polygon.forEach(function (ring) {
      if(pip([point.longitude, point.latitude], ring)) inside++;
    });
  });
  return inside % 2;
}
function ( point , geopoly ) { var inside = 0 ; if ( geopoly . type !== "Polygon" && geopoly . type !== "MultiPolygon" ) return false ; var shape = geopoly . type === 'Polygon' ? [ geopoly . coordinates ] : geopoly . coordinates ; shape . forEach ( function ( polygon ) { polygon . forEach ( function ( ring ) { if ( pip ( [ point . longitude , point . latitude ] , ring ) ) inside ++ ; } ) ; } ) ; return inside % 2 ; }
utilizing point-in-poly but providing support for geojson polys and holes.
utilizing point - in - poly but providing support for geojson polys and holes .