Takes a point and a geometry (Point, Polygon, LineString, GeometryCollection, ...) and calculates the closest point on the geometry using turf. If the point lies within a polygon, it will return the point itself.
nearest-point-on-geometry mostly relies on @turf/nearest-point-on-line and accepts the same parameters.