Extracts the pathname from a URL string.
getPathname('https://example.com/path?query=123'); // '/path'getPathname('invalid-url'); // undefined Copy
getPathname('https://example.com/path?query=123'); // '/path'getPathname('invalid-url'); // undefined
Extracts the pathname from a URL string.