npm.io
1.0.1 • Published 7 years ago

is-repo

Licence
MIT
Version
1.0.1
Deps
0
Size
4 kB
Vulns
0
Weekly
0

Is Repo

Build Status install size npm version

Determines whether a given path is a Git repository. Uses git rev-parse --is-inside-work-tree.

Installation

yarn add is-repo
# or with npm
npm i is-repo

Usage

Very simple.

import isRepo from 'is-repo';

await isRepo(); // defaults to process.cwd()
await isRepo('path/to/repo'); // true || false