@wordpress/url
Version:
WordPress URL utilities.
8 lines (7 loc) • 760 B
Source Map (JSON)
{
"version": 3,
"sources": ["../src/has-query-arg.ts"],
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport { getQueryArg } from './get-query-arg';\n\n/**\n * Determines whether the URL contains a given query arg.\n *\n * @param url URL.\n * @param arg Query arg name.\n *\n * @example\n * ```js\n * const hasBar = hasQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'bar' ); // true\n * ```\n *\n * @return Whether or not the URL contains the query arg.\n */\nexport function hasQueryArg( url: string, arg: string ): boolean {\n\treturn getQueryArg( url, arg ) !== undefined;\n}\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,2BAA4B;AAerB,SAAS,YAAa,KAAa,KAAuB;AAChE,aAAO,kCAAa,KAAK,GAAI,MAAM;AACpC;",
"names": []
}