sanity
Version:
Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches
14 lines (12 loc) • 418 B
text/typescript
import {type SanityDocument} from '@sanity/client'
import {type SanityDocumentLike} from '@sanity/types'
/**
* checks if the document has been set for unpublishing
* @internal
*
* @param document - sanity document
* @returns boolean if the system delete is set
*/
export function isGoingToUnpublish(document: SanityDocument | SanityDocumentLike): boolean {
return Boolean(document._system?.delete === true)
}