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

Function getSearchPostTypesFromUrl

packages/shared/src/graphql/search.ts:83–86  ·  view source on GitHub ↗
(value?: string)

Source from the content-addressed store, hash-verified

81 .filter(Boolean) ?? [];
82
83export const getSearchPostTypesFromUrl = (value?: string): PostType[] =>
84 getSearchListFromUrl(value)
85 .map((slug) => urlSlugToSearchPostType[slug])
86 .filter((postType): postType is PostType => !!postType);
87
88export const getSearchPostTypesQueryParam = (
89 postTypes: string[],

Callers 2

SearchContext.tsxFile · 0.90
search.spec.tsFile · 0.90

Calls 1

getSearchListFromUrlFunction · 0.85

Tested by

no test coverage detected