@@ -43,16 +43,16 @@ export interface HasProtocolOptions {
4343 */
4444export function hasProtocol (
4545 inputString : string ,
46- opts ?: HasProtocolOptions
46+ opts ?: HasProtocolOptions ,
4747) : boolean ;
4848/** @deprecated Same as { hasProtocol(inputString, { acceptRelative: true }) */
4949export function hasProtocol (
5050 inputString : string ,
51- acceptRelative : boolean
51+ acceptRelative : boolean ,
5252) : boolean ;
5353export function hasProtocol (
5454 inputString : string ,
55- opts : boolean | HasProtocolOptions = { }
55+ opts : boolean | HasProtocolOptions = { } ,
5656) : boolean {
5757 if ( typeof opts === "boolean" ) {
5858 opts = { acceptRelative : opts } ;
@@ -82,7 +82,7 @@ export function isScriptProtocol(protocol?: string) {
8282 */
8383export function hasTrailingSlash (
8484 input = "" ,
85- respectQueryAndFragment ?: boolean
85+ respectQueryAndFragment ?: boolean ,
8686) : boolean {
8787 if ( ! respectQueryAndFragment ) {
8888 return input . endsWith ( "/" ) ;
@@ -107,7 +107,7 @@ export function hasTrailingSlash(
107107 */
108108export function withoutTrailingSlash (
109109 input = "" ,
110- respectQueryAndFragment ?: boolean
110+ respectQueryAndFragment ?: boolean ,
111111) : string {
112112 if ( ! respectQueryAndFragment ) {
113113 return ( hasTrailingSlash ( input ) ? input . slice ( 0 , - 1 ) : input ) || "/" ;
@@ -146,7 +146,7 @@ export function withoutTrailingSlash(
146146 */
147147export function withTrailingSlash (
148148 input = "" ,
149- respectQueryAndFragment ?: boolean
149+ respectQueryAndFragment ?: boolean ,
150150) : string {
151151 if ( ! respectQueryAndFragment ) {
152152 return input . endsWith ( "/" ) ? input : input + "/" ;
@@ -283,7 +283,7 @@ export function withQuery(input: string, query: QueryObject): string {
283283 * @group utils
284284 */
285285export function getQuery < T extends ParsedQuery = ParsedQuery > (
286- input : string
286+ input : string ,
287287) : T {
288288 return parseQuery < T > ( parseURL ( input ) . search ) ;
289289}
@@ -506,7 +506,7 @@ export function normalizeURL(input: string): string {
506506export function resolveURL ( base = "" , ...inputs : string [ ] ) : string {
507507 if ( typeof base !== "string" ) {
508508 throw new TypeError (
509- `URL input should be string received ${ typeof base } (${ base } )`
509+ `URL input should be string received ${ typeof base } (${ base } )` ,
510510 ) ;
511511 }
512512
0 commit comments