@axelrindle/is-git-repository

Test whether a given directory belongs to a git repository.

Usage no npm install needed!

<script type="module">
  import axelrindleIsGitRepository from 'https://cdn.skypack.dev/@axelrindle/is-git-repository';
</script>

README

CI Codacy Badge Codacy Badge

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.

License

MIT