parse

Parses a shortlink code, /go/ path, or OpenStreetMap URL.

URLs may use osm.org, www.osm.org, openstreetmap.org, or www.openstreetmap.org. Historical @ and = characters are accepted and text emits ~ and -.

Throws

if text is not a valid OpenStreetMap shortlink.