MCPcopy Create free account
hub / github.com/dailydotdev/apps / getScopeBasePath

Function getScopeBasePath

packages/shared/src/lib/archive.ts:54–64  ·  view source on GitHub ↗
(scope: ArchiveScopeInfo)

Source from the content-addressed store, hash-verified

52}
53
54function getScopeBasePath(scope: ArchiveScopeInfo): string {
55 if (scope.scopeType === ArchiveScopeType.Global) {
56 return '/posts/best-of';
57 }
58
59 if (scope.scopeType === ArchiveScopeType.Tag) {
60 return `/tags/${encodeURIComponent(scope.scopeId)}/best-of`;
61 }
62
63 return `/sources/${encodeURIComponent(scope.scopeId)}/best-of`;
64}
65
66export function getArchiveIndexUrl(scope: ArchiveScopeInfo): string {
67 return getScopeBasePath(scope);

Callers 2

getArchiveIndexUrlFunction · 0.85
getArchiveUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected