MCPcopy Create free account
hub / github.com/dfinity/orbit / removeBasePathFromPathname

Function removeBasePathFromPathname

apps/wallet/src/utils/helper.utils.ts:309–313  ·  view source on GitHub ↗
(pathname: string, basePath: string)

Source from the content-addressed store, hash-verified

307}
308
309export const removeBasePathFromPathname = (pathname: string, basePath: string): string => {
310 const updatedPath = pathname.startsWith(basePath) ? pathname.slice(basePath.length) : pathname;
311
312 return !updatedPath.startsWith('/') ? `/${updatedPath}` : updatedPath;
313};
314
315export const toArrayBuffer = (input: Uint8Array | number[]): ArrayBuffer => {
316 return input instanceof Uint8Array ? input.buffer : new Uint8Array(input).buffer;

Callers 3

init.config.tsFile · 0.90
connectToFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected