@based/opts
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -51,9 +51,10 @@ "use strict"; | ||
if (opts.url) { | ||
let url; | ||
if (typeof opts.url === 'function') { | ||
return await opts.url(); | ||
url = await opts.url(); | ||
} | ||
if (http && isWsRe.test(opts.url)) { | ||
return opts.url.replace(isWsRe, 'http'); | ||
if (http && isWsRe.test(url)) { | ||
return url.replace(isWsRe, 'http'); | ||
} | ||
return opts.url; | ||
return url; | ||
} | ||
@@ -60,0 +61,0 @@ const discoveryUrls = opts.discoveryUrls || [ |
{ | ||
"name": "@based/opts", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "public": true, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
129
9493