is-git

check if dir is directory or not

Usage no npm install needed!

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

README

is-git NPM version Build Status

check if dir is git directory or not

Install

$ npm install --save is-git

Example

JavaScript

var isGit = require('is-git');
isGit("/path/folder"); // or false

isGit("*"); //true or false

isGit(); //true or false

Command Line reference

$ npm install --g git-scope-config
$ is-git --path path/to/git/folder

Methods

var isGit = require('is-git');
isGit("/path/folder"); // or false

isGit("*"); //true or false

isGit(); //true or false

isGit([path], cb)

Check if current folder is git folder or not

Run Test

npm test

Contribute or Report Issue

For bugs and feature requests, please create an issue.

License

MIT © Yashprit