Skip to content

Commit

Permalink
fix: url lint: -unnecessary escapes
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-zhening-luo committed Jan 23, 2025
1 parent 62dc501 commit 8d1cfb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/object/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function (
path = "",
query = "",
fragment = "",
} = (/^(?<scheme>\p{L}[-+\.\p{L}\d]+):\/\/(?<host>(?:(?:[-~!$&'()*+,;=\.\w]|(?:%[a-fA-F\d]{2}))*(?::\d+)?))(?<path>(?:\/(?:(?:[-~!$&'()*+,;=\.\w]|(?:%[a-fA-F\d]{2}))|[:@])*)*)(?<query>(?:\?(?:(?:(?:[-~!$&'()*+,;=\.\w]|(?:%[a-fA-F\d]{2}))|[:@])|[\/?])*)|)(?<fragment>(?:#(?:(?:(?:[-~!$&'()*+,;=\.\w]|(?:%[a-fA-F\d]{2}))|[:@])|[\/?])*)|)$/u)
} = (/^(?<scheme>\p{L}[-+.\p{L}\d]+):\/\/(?<host>(?:(?:[-~!$&'()*+,;=.\w]|(?:%[a-fA-F\d]{2}))*(?::\d+)?))(?<path>(?:\/(?:(?:[-~!$&'()*+,;=.\w]|(?:%[a-fA-F\d]{2}))|[:@])*)*)(?<query>(?:\?(?:(?:(?:[-~!$&'()*+,;=.\w]|(?:%[a-fA-F\d]{2}))|[:@])|[/?])*)|)(?<fragment>(?:#(?:(?:(?:[-~!$&'()*+,;=.\w]|(?:%[a-fA-F\d]{2}))|[:@])|[/?])*)|)$/u)
.exec(string)?.groups ?? {},
http = ["https", "http"].includes(scheme.toLocaleLowerCase());

Expand Down

0 comments on commit 8d1cfb9

Please sign in to comment.