( postTypes: string[], )
| 86 | .filter((postType): postType is PostType => !!postType); |
| 87 | |
| 88 | export const getSearchPostTypesQueryParam = ( |
| 89 | postTypes: string[], |
| 90 | ): { type?: string } => { |
| 91 | const slugs = [...new Set(postTypes)] |
| 92 | .map((postType) => searchPostTypeUrlSlug[postType as PostType]) |
| 93 | .filter((slug): slug is string => !!slug); |
| 94 | |
| 95 | return slugs.length ? { type: slugs.join(',') } : {}; |
| 96 | }; |
| 97 | |
| 98 | export const getSearchContentCurationFromUrl = (value?: string): string[] => |
| 99 | getSearchListFromUrl(value); |
no outgoing calls
no test coverage detected