node-is-git-repository
Node.JS package for testing whether a given directory belongs to a git repository.
Installation
$ npm i @axelrindle/is-git-repository
Usage
const isGitRepository = require('@axelrindle/is-git-repository');
(async () => {
await isGitRepository(); // fails when not in a valid git repository
// ...
})();
Check the wiki for a full API overview.