MCPcopy
hub / github.com/AndrewWalsh/openapi-devtools / pathToArray

Function pathToArray

src/utils/helpers.ts:55–57  ·  view source on GitHub ↗
(pathname: string)

Source from the content-addressed store, hash-verified

53};
54
55export const pathToArray = (pathname: string): Array<string> => {
56 return pathname.split("/").slice(1);
57};
58
59export const arrayToPath = (parts: Array<string>): string =>
60 `/${parts.join("/")}`;

Callers 5

getParameterisedPathFunction · 0.90
getNextPathFunction · 0.90
pathToPartsFunction · 0.90
upsertFunction · 0.90
parameteriseFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected