UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

1 lines • 1.01 kB
{"version":3,"file":"getPathFromRoute.js","names":[],"sources":["esm/vercel/build/getPathFromRoute.js"],"sourcesContent":["import { getPathnameFromFilePath } from \"../../utils/getPathnameFromFilePath\";\nfunction getPathFromRoute(route, options = {}) {\n const params = {};\n for (const [param, inner] of route.file.matchAll(/\\[([^\\]]+)\\]/g)) {\n params[inner] = param;\n params[inner.replace(/^\\.\\.\\./, \"\")] = param;\n }\n return getPathnameFromFilePath(route.file, params, false, {\n ...options,\n preserveExtensions: true\n }).replace(/^\\.\\//, \"/\").replace(/\\/+$/, \"\");\n}\nexport {\n getPathFromRoute\n};\n//# sourceMappingURL=getPathFromRoute.js.map\n"],"mappings":";;;AACA,SAAS,iBAAiB,OAAO,UAAU,CAAC,GAAG;CAC7C,MAAM,SAAS,CAAC;CAChB,KAAK,MAAM,CAAC,OAAO,UAAU,MAAM,KAAK,SAAS,eAAe,GAAG;EACjE,OAAO,SAAS;EAChB,OAAO,MAAM,QAAQ,WAAW,EAAE,KAAK;CACzC;CACA,OAAO,wBAAwB,MAAM,MAAM,QAAQ,OAAO;EACxD,GAAG;EACH,oBAAoB;CACtB,CAAC,CAAC,CAAC,QAAQ,SAAS,GAAG,CAAC,CAAC,QAAQ,QAAQ,EAAE;AAC7C"}