{"version":3,"file":"get-path-and-query-string.mjs","names":[],"sources":["../src/get-path-and-query-string.ts"],"sourcesContent":["import { getPath, getQueryString } from '.';\n\n/**\n * Returns the path part and query string part of the URL.\n *\n * @param url The full URL.\n *\n * @example\n * ```js\n * const pathAndQueryString1 = getPathAndQueryString( 'http://localhost:8080/this/is/a/test?query=true' ); // '/this/is/a/test?query=true'\n * const pathAndQueryString2 = getPathAndQueryString( 'https://wordpress.org/help/faq/' ); // '/help/faq'\n * ```\n *\n * @return The path part and query string part of the URL.\n */\nexport function getPathAndQueryString( url: string ): string {\n\tconst path = getPath( url );\n\tconst queryString = getQueryString( url );\n\tlet value = '/';\n\tif ( path ) {\n\t\tvalue += path;\n\t}\n\tif ( queryString ) {\n\t\tvalue += `?${ queryString }`;\n\t}\n\treturn value;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAgB,sBAAuB,KAAsB;CAC5D,MAAM,OAAO,QAAS,GAAI;CAC1B,MAAM,cAAc,eAAgB,GAAI;CACxC,IAAI,QAAQ;CACZ,IAAK,MACJ,SAAS;CAEV,IAAK,aACJ,SAAS,IAAK;CAEf,OAAO;AACR"}