(context: string, previewContext: string)
| 309 | * otherwise checks for inclusion of a value from `PREVIEW_CONTEXT_KEYWORDS`. |
| 310 | */ |
| 311 | export function isPreviewContext(context: string, previewContext: string) { |
| 312 | if (previewContext) { |
| 313 | return context === previewContext; |
| 314 | } |
| 315 | return PREVIEW_CONTEXT_KEYWORDS.some(keyword => context.includes(keyword)); |
| 316 | } |
| 317 | |
| 318 | export enum PreviewState { |
| 319 | Other = 'other', |
no test coverage detected