@jsenv/urls
Advanced tools
Comparing version 2.5.4 to 2.6.0
{ | ||
"name": "@jsenv/urls", | ||
"version": "2.5.4", | ||
"version": "2.6.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -7,2 +7,3 @@ // tslint:disable:ordered-imports | ||
asUrlWithoutSearch, | ||
asSpecifierWithoutSearch, | ||
isValidUrl, | ||
@@ -9,0 +10,0 @@ normalizeUrl, |
@@ -26,2 +26,10 @@ import { filenameToBasename } from "./url_to_basename.js"; | ||
export const asSpecifierWithoutSearch = (specifier) => { | ||
if (isValidUrl(specifier)) { | ||
return asUrlWithoutSearch(specifier); | ||
} | ||
const [beforeQuestion] = specifier.split("?"); | ||
return beforeQuestion; | ||
}; | ||
// normalize url search params: | ||
@@ -28,0 +36,0 @@ // Using URLSearchParams to alter the url search params |
24795
724