@wordpress/url
Version:
WordPress URL utilities.
15 lines • 422 B
TypeScript
/**
* Returns the path part of the URL.
*
* @param url The full URL.
*
* @example
* ```js
* const path1 = getPath( 'http://localhost:8080/this/is/a/test?query=true' ); // 'this/is/a/test'
* const path2 = getPath( 'https://wordpress.org/help/faq/' ); // 'help/faq'
* ```
*
* @return The path part of the URL.
*/
export declare function getPath(url: string): string | void;
//# sourceMappingURL=get-path.d.ts.map