| /expo/packages/expo-router/src/link/ |
| H A D | href.ts | 5 pathname?: string; property 13 return resolveHref({ pathname: href ?? '' }); 15 const path = href.pathname ?? ''; 19 const { pathname, params } = createQualifiedPathname(path, { constant 23 return pathname + (paramsString ? `?${paramsString}` : ''); 27 pathname: string, 33 if (pathname.includes(dynamicKey)) { 34 pathname = pathname.replace(dynamicKey, encodeParam(value)); 35 } else if (pathname.includes(deepDynamicKey)) { 36 pathname = pathname.replace(deepDynamicKey, encodeParam(value)); [all …]
|
| /expo/packages/expo-router/build/link/ |
| H A D | href.js | 7 return (0, exports.resolveHref)({ pathname: href ?? '' }); property 9 const path = href.pathname ?? ''; 13 const { pathname, params } = createQualifiedPathname(path, { 17 return pathname + (paramsString ? `?${paramsString}` : ''); 20 function createQualifiedPathname(pathname, params) { argument 24 if (pathname.includes(dynamicKey)) { 25 pathname = pathname.replace(dynamicKey, encodeParam(value)); 27 else if (pathname.includes(deepDynamicKey)) { 28 pathname = pathname.replace(deepDynamicKey, encodeParam(value)); 35 return { pathname, params };
|
| H A D | href.js.map | 1 …pathname?: string;\n /** Query parameters for the path. */\n params?: Record<string, any>;\n}\n\…
|
| /expo/packages/expo-router/src/link/__tests__/ |
| H A D | href.test.node.ts | 18 expect(resolveHref({ pathname: '/[some]', params: { some: 'value' } })).toBe('/value'); 21 pathname: '/[some]/cool/[thing]', 27 pathname: '/[some]/cool/[thing]', 33 expect(resolveHref({ pathname: '/alpha', params: { beta: null } })).toBe('/alpha'); 36 pathname: '/alpha', 42 expect(resolveHref({ pathname: '/alpha', params: { beta: 'value' } })).toBe( 47 pathname: '/alpha', 53 pathname: '/alpha', 59 pathname: '/alpha/[beta]', 65 expect(resolveHref({ pathname: '/fake/path', params: { value: '++test++' } })).toBe(
|
| /expo/packages/@expo/cli/src/start/server/type-generation/__typetests__/ |
| H A D | route.test.ts | 63 expectError(router.push({ pathname: 'should-error' })); 67 expectType<void>(router.push({ pathname: '/apple' })); 68 expectType<void>(router.push({ pathname: '/banana' })); 79 pathname: '/colors/[color]', 88 pathname: '/colors/[invalid]', 97 pathname: '/colors/[color]', 106 pathname: '/animals/[...animal]', 115 pathname: '/mix/[fruit]/[color]/[...animals]', 124 pathname: '/animals/[...animal]', 133 pathname: '/mix/[fruit]/[color]/[...animals]', [all …]
|
| /expo/packages/expo-router/src/fork/ |
| H A D | extractPathFromURL.ts | 23 const pathname = url.match(/exps?:\/\/.*?\/--\/(.*)/)?.[1]; constant 24 if (pathname) { 25 return fromDeepLink('a://' + pathname); 36 adjustPathname({ hostname: res.hostname, pathname: res.path || '' }) + (qs ? '?' + qs : '') 75 if (res.pathname) { 76 results += res.pathname; 91 export function adjustPathname(url: { hostname?: string | null; pathname: string }) { 94 return url.pathname.split('/').slice(2).join('/'); 96 return url.pathname;
|
| /expo/packages/expo-asset/src/ |
| H A D | AssetUris.ts | 4 const { pathname } = new URL(url, {}); constant 5 return pathname.substring(pathname.lastIndexOf('/') + 1); 37 const directory = urlObject.pathname.substring(0, urlObject.pathname.lastIndexOf('/') + 1);
|
| /expo/packages/expo-asset/build/ |
| H A D | AssetUris.js | 3 const { pathname } = new URL(url, {}); 4 return pathname.substring(pathname.lastIndexOf('/') + 1); 33 const directory = urlObject.pathname.substring(0, urlObject.pathname.lastIndexOf('/') + 1);
|
| /expo/docs/providers/ |
| H A D | page-api-version.test.tsx | 41 it('uses sdk version from pathname', () => { 46 it('uses unversioned version from pathname', () => { 51 it('uses latest version from pathname', () => { 67 it('returns unversioned from pathname', () => { 71 it('returns latest from sdk pathname', () => { 75 it('returns v44.0.0 from react-native pathname', () => { 79 it('returns null for non-versioned pathname', () => { 85 it('returns same pathname for non-versioned pathname', () => { 91 it('returns new pathname for unversioned pathname', () => { 95 it('returns new pathname for sdk pathname', () => { [all …]
|
| H A D | page-api-version.tsx | 28 const version = getVersionFromPath(router?.pathname ?? ''); 33 router?.push(replaceVersionInPath(router.pathname, newVersion)); 49 * Find the version within the pathname of the URL. 50 * This only accepts pathname without hashes or query strings. 59 * Replace the version in the pathname from the URL.
|
| /expo/packages/@expo/cli/src/start/server/middleware/ |
| H A D | ServeStaticMiddleware.ts | 34 const pathname = parse(req.url).pathname; constant 35 if (!pathname) { 39 debug(`Maybe serve static:`, pathname); 40 const stream = send(req, pathname, opts);
|
| /expo/packages/expo-router/build/fork/ |
| H A D | extractPathFromURL.js | 47 const pathname = url.match(/exps?:\/\/.*?\/--\/(.*)/)?.[1]; 48 if (pathname) { 49 return fromDeepLink('a://' + pathname); 57 …return (adjustPathname({ hostname: res.hostname, pathname: res.path || '' }) + (qs ? '?' + qs : ''… property 86 if (res.pathname) { 87 results += res.pathname; 102 return url.pathname.split('/').slice(2).join('/'); 104 return url.pathname;
|
| /expo/docs/ui/components/Navigation/ |
| H A D | Navigation.tsx | 19 const activeRoutes = useMemo(() => findActiveRoute(routes, router?.pathname), [router?.pathname]); 55 * Find the active routes by pathname, and do it once. 57 * - Page -> if the pathname matches the page's href property 61 export function findActiveRoute(routes: NavigationNode[], pathname?: string) { 68 if (!pathname) { 78 if (route.href === pathname) { 86 const nestedActiveRoutes = findActiveRoute(route.children, pathname); 97 const nestedActiveRoutes = findActiveRoute(route.children, pathname);
|
| /expo/home/legacy/ |
| H A D | FriendlyUrls.ts | 15 components.pathname = components.pathname ? components.pathname.substr(1) : '';
|
| /expo/docs/components/ |
| H A D | DocumentationPage.tsx | 55 const pathname = router?.pathname ?? '/'; 62 const routes = RoutesUtils.getRoutes(pathname, version); 63 const sidebarActiveGroup = RoutesUtils.getPageSection(pathname); 70 RoutesUtils.getPageSection(pathname) !== RoutesUtils.getPageSection(url) || 71 pathname === '/' 124 content={RoutesUtils.isReferencePath(pathname) ? version : 'none'} 128 RoutesUtils.isPreviewPath(pathname) || 129 RoutesUtils.isArchivePath(pathname)) && <meta name="robots" content="noindex" />} 131 <link rel="canonical" href={getCanonicalUrl(pathname)} />
|
| /expo/docs/ui/components/Footer/ |
| H A D | Footer.tsx | 19 const isAPIPage = router?.pathname.includes('/sdk/') ?? false; 29 {router?.pathname && <EditPageLink pathname={router.pathname} />}
|
| /expo/packages/expo-router/build/ |
| H A D | LocationProvider.js | 11 pathname: (0, getStateFromPath_1.stripBasePath)(path, basePath).split('?')['0'], 18 const [pathname] = statePath.split('?'); 21 …segments: (0, getStateFromPath_1.stripBasePath)(pathname, basePath).split('/').filter(Boolean).map…
|
| /expo/packages/@expo/cli/src/start/server/metro/ |
| H A D | runServer-fork.ts | 109 const { pathname } = parse(request.url!); constant 110 if (pathname != null && websocketEndpoints[pathname]) { 111 websocketEndpoints[pathname].handleUpgrade(request, socket, head, (ws) => { 112 websocketEndpoints[pathname].emit('connection', ws, request);
|
| /expo/packages/expo-linking/build/ |
| H A D | createURL.web.js | 44 path: !parsed.hostname && !parsed.pathname 46 : parsed.pathname === '' 48 : parsed.pathname.replace(/^\//, ''),
|
| /expo/packages/expo-linking/src/ |
| H A D | createURL.web.ts | 45 !parsed.hostname && !parsed.pathname 47 : parsed.pathname === '' 49 : parsed.pathname.replace(/^\//, ''),
|
| /expo/packages/@expo/metro-runtime/src/location/ |
| H A D | Location.native.ts | 71 pathname: { 73 return url.pathname; 160 pathname: this.pathname, constant
|
| /expo/docs/ |
| H A D | next.config.js | 94 ...Object.entries(defaultPathMap).map(([pathname, page]) => { 95 if (pathname.match(/unversioned/)) { 100 const versionMatch = pathname.match(/\/v(\d\d\.\d\.\d)\//); 106 return { [pathname]: page };
|
| /expo/packages/@expo/metro-runtime/src/ |
| H A D | getDevServer.ts | 27 location.origin + location.pathname + '?' + qs.stringify({ ...query, platform: 'web' }) 30 url: location.origin + location.pathname,
|
| /expo/packages/expo-router/src/ |
| H A D | LocationProvider.tsx | 8 pathname: string; 24 pathname: stripBasePath(path, basePath).split('?')['0'], 40 const [pathname] = statePath.split('?'); 43 segments: stripBasePath(pathname, basePath).split('/').filter(Boolean).map(decodeURIComponent),
|
| /expo/packages/@expo/metro-runtime/build/location/ |
| H A D | Location.native.js | 73 pathname: { property 75 return url.pathname; 163 pathname: this.pathname, property
|