Returns the current URL path as an Array
of String
s.
For example, consider a sketch hosted at the URL https://example.com/sketchbook
. Calling getURLPath()
returns ['sketchbook']
. For a sketch hosted at the URL https://example.com/sketchbook/monday
, getURLPath()
returns ['sketchbook', 'monday']
.
Examples
Returns
String[]: path components.
Notice any errors or typos? Please let us know. Please feel free to edit src/core/environment.js and open a pull request!