MCPcopy Create free account
hub / github.com/decaporg/decap-cms / isPreviewContext

Function isPreviewContext

packages/decap-cms-lib-util/src/API.ts:311–316  ·  view source on GitHub ↗
(context: string, previewContext: string)

Source from the content-addressed store, hash-verified

309 * otherwise checks for inclusion of a value from `PREVIEW_CONTEXT_KEYWORDS`.
310 */
311export 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
318export enum PreviewState {
319 Other = 'other',

Callers 1

getPreviewStatusFunction · 0.85

Calls 1

someMethod · 0.80

Tested by

no test coverage detected