@thinice/ensure-dir-exists
v0.1.4
Published
Creates a directory if missing (no recursion drama)
Readme
@thinice/ensure-dir-exists
Creates a directory if missing (creates parent directories as needed).
Installation
npm install @thinice/ensure-dir-existsUsage
import { ensureDirExists } from "@thinice/ensure-dir-exists";
await ensureDirExists("./logs"); // Creates if missing, no-op if exists
await ensureDirExists("./a/b/c"); // Creates nested directoriesSource
https://github.com/thinicejs/utils/tree/main/packages/ensure-dir-exists
