Home
last modified time | relevance | path

Searched refs:pathname (Results 1 – 25 of 134) sorted by relevance

123456

/expo/packages/expo-router/src/link/
H A Dhref.ts5 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 Dhref.js7 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 Dhref.js.map1pathname?: string;\n /** Query parameters for the path. */\n params?: Record<string, any>;\n}\n\…
/expo/packages/expo-router/src/link/__tests__/
H A Dhref.test.node.ts18 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 Droute.test.ts63 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 DextractPathFromURL.ts23 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 DAssetUris.ts4 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 DAssetUris.js3 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 Dpage-api-version.test.tsx41 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 Dpage-api-version.tsx28 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 DServeStaticMiddleware.ts34 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 DextractPathFromURL.js47 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 DNavigation.tsx19 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 DFriendlyUrls.ts15 components.pathname = components.pathname ? components.pathname.substr(1) : '';
/expo/docs/components/
H A DDocumentationPage.tsx55 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 DFooter.tsx19 const isAPIPage = router?.pathname.includes('/sdk/') ?? false;
29 {router?.pathname && <EditPageLink pathname={router.pathname} />}
/expo/packages/expo-router/build/
H A DLocationProvider.js11 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 DrunServer-fork.ts109 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 DcreateURL.web.js44 path: !parsed.hostname && !parsed.pathname
46 : parsed.pathname === ''
48 : parsed.pathname.replace(/^\//, ''),
/expo/packages/expo-linking/src/
H A DcreateURL.web.ts45 !parsed.hostname && !parsed.pathname
47 : parsed.pathname === ''
49 : parsed.pathname.replace(/^\//, ''),
/expo/packages/@expo/metro-runtime/src/location/
H A DLocation.native.ts71 pathname: {
73 return url.pathname;
160 pathname: this.pathname, constant
/expo/docs/
H A Dnext.config.js94 ...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 DgetDevServer.ts27 location.origin + location.pathname + '?' + qs.stringify({ ...query, platform: 'web' })
30 url: location.origin + location.pathname,
/expo/packages/expo-router/src/
H A DLocationProvider.tsx8 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 DLocation.native.js73 pathname: { property
75 return url.pathname;
163 pathname: this.pathname, property

123456