Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 4dcb474

Browse files
committed
Fixing missing util file.
1 parent 5b98887 commit 4dcb474

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

utils/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict';
2+
3+
function formatApiHost(apihost) {
4+
if (apihost && !(apihost.startsWith('http://') || apihost.startsWith('https://'))) {
5+
// assume https unless explicitly declared
6+
return `https://${apihost}`;
7+
} else {
8+
return apihost;
9+
}
10+
}
11+
12+
module.exports = { formatApiHost };

0 commit comments

Comments
 (0)