UNPKG

localbackup

Version:

Utility to make local backups easily and without the hassle.

12 lines (10 loc) 242 B
import fs from 'node:fs' export function isDir (path: string): boolean { try { const stat = fs.lstatSync(path) return stat.isDirectory() } catch (e) { // lstatSync throws an error if path doesn't exist return false } }