UNPKG

expo-router

Version:

Expo Router is a file-based router for React Native and web applications.

22 lines (20 loc) • 753 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "resolveLoaderPath", { enumerable: true, get: function() { return resolveLoaderPath; } }); const _getSingularId = require("../utils/getSingularId"); function resolveLoaderPath(contextKey, routeInfo) { const contextPath = contextKey.startsWith('/') ? contextKey.slice(1) : contextKey; const resolvedPathname = `/${(0, _getSingularId.getSingularId)(contextPath, { params: routeInfo?.params ?? {} })}`; const searchString = routeInfo?.searchParams?.toString() || ''; return searchString ? `${resolvedPathname}?${searchString}` : resolvedPathname; } //# sourceMappingURL=resolveLoaderPath.js.map