UNPKG

@wordpress/url

Version:
15 lines 429 B
/** * Returns the filename part of the URL. * * @param url The full URL. * * @example * ```js * const filename1 = getFilename( 'http://localhost:8080/this/is/a/test.jpg' ); // 'test.jpg' * const filename2 = getFilename( '/this/is/a/test.png' ); // 'test.png' * ``` * * @return The filename part of the URL. */ export declare function getFilename(url: string): string | void; //# sourceMappingURL=get-filename.d.ts.map