@settlemint/sdk-utils
Advanced tools
Comparing version
@@ -300,2 +300,5 @@ //#region src/json.ts | ||
const url = new URL(baseUrl); | ||
if (pathSegment.trim() === "") { | ||
return url.toString(); | ||
} | ||
const segmentIndex = url.pathname.indexOf(pathSegment); | ||
@@ -302,0 +305,0 @@ return url.origin + (segmentIndex >= 0 ? url.pathname.substring(0, segmentIndex) : url.pathname); |
@@ -18,2 +18,5 @@ //#region src/url.ts | ||
const url = new URL(baseUrl); | ||
if (pathSegment.trim() === "") { | ||
return url.toString(); | ||
} | ||
const segmentIndex = url.pathname.indexOf(pathSegment); | ||
@@ -20,0 +23,0 @@ return url.origin + (segmentIndex >= 0 ? url.pathname.substring(0, segmentIndex) : url.pathname); |
{ | ||
"name": "@settlemint/sdk-utils", | ||
"description": "Shared utilities and helper functions for SettleMint SDK modules", | ||
"version": "2.4.1-main94989dab", | ||
"version": "2.4.1-maina3bea26e", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "private": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
8154649
0.01%91164
0.01%