{"version":3,"file":"get-authority.mjs","names":[],"sources":["../src/get-authority.ts"],"sourcesContent":["/**\n * Returns the authority part of the URL.\n *\n * @param url The full URL.\n *\n * @example\n * ```js\n * const authority1 = getAuthority( 'https://wordpress.org/help/' ); // 'wordpress.org'\n * const authority2 = getAuthority( 'https://localhost:8080/test/' ); // 'localhost:8080'\n * ```\n *\n * @return The authority part of the URL.\n */\nexport function getAuthority( url: string ): string | void {\n\tconst matches = /^[^\\/\\s:]+:(?:\\/\\/)?\\/?([^\\/\\s#?]+)[\\/#?]{0,1}\\S*$/.exec(\n\t\turl\n\t);\n\tif ( matches ) {\n\t\treturn matches[ 1 ];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,SAAgB,aAAc,KAA6B;CAC1D,MAAM,UAAU,qDAAqD,KACpE,GACD;CACA,IAAK,SACJ,OAAO,QAAS;AAElB"}