@wtasnorg/node-lib / isGitInit
isGitInit(
dirPath?,fs?):boolean
Defined in: src/git.ts:32
Check whether a .git directory exists at the given path,
indicating the directory is (or is inside) a Git repository.
string
Directory to check (defaults to process.cwd()).
Injectable filesystem dependency (defaults to Node fs.existsSync).
boolean
true when a .git entry exists.
import { isGitInit } from "@wtasnorg/node-lib/git";
isGitInit("/my/project"); // true or false