UNPKG

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

11 lines (9 loc) 194 B
import fs from 'fs/promises' export async function fileExists(filePath: string): Promise<boolean> { try { await fs.access(filePath) return true } catch (_) { return false } }