MCPcopy Create free account
hub / github.com/code-forge-io/Remix-Forge / convertRemixPathToUrl

Function convertRemixPathToUrl

src/utils/file.ts:346–351  ·  view source on GitHub ↗
(chunk: string)

Source from the content-addressed store, hash-verified

344 * @returns Returns the converted chunk
345 */
346export const convertRemixPathToUrl = (chunk: string) => {
347 if (chunk.startsWith("__") || chunk.startsWith("_") || chunk.includes("index") || chunk.includes("route")) {
348 return "";
349 }
350 return chunk.replace(/_/g, "").replace(/\[/g, ":").replace(/\]/g, "").replace("+", "");
351};
352/**
353 * Method to generate the final path to open in browser
354 * @param prefix Url prefix eg http://localhost:3000

Callers 1

generatePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected