UNPKG

@wordpress/url

Version:
15 lines 459 B
/** * Returns the authority part of the URL. * * @param {string} url The full URL. * * @example * ```js * const authority1 = getAuthority( 'https://wordpress.org/help/' ); // 'wordpress.org' * const authority2 = getAuthority( 'https://localhost:8080/test/' ); // 'localhost:8080' * ``` * * @return {string|void} The authority part of the URL. */ export function getAuthority(url: string): string | void; //# sourceMappingURL=get-authority.d.ts.map