Skip to content

Commit 6c605b8

Browse files
authored
libraries: convert urlUtils to TypeScript (prebid#13497)
1 parent ef98300 commit 6c605b8

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

libraries/urlUtils/urlUtils.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

libraries/urlUtils/urlUtils.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export function tryAppendQueryString(existingUrl: string, key: string, value: string): string {
2+
if (value) {
3+
return `${existingUrl}${key}=${encodeURIComponent(value)}&`;
4+
}
5+
6+
return existingUrl;
7+
}

0 commit comments

Comments
 (0)