https://github.com/krmax44/is-repo
Determines whether a given path is a Git repository.
https://github.com/krmax44/is-repo
Last synced: 4 months ago
JSON representation
Determines whether a given path is a Git repository.
- Host: GitHub
- URL: https://github.com/krmax44/is-repo
- Owner: krmax44
- License: mit
- Created: 2019-09-17T16:47:11.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T14:01:29.000Z (over 3 years ago)
- Last Synced: 2025-02-09T11:46:05.109Z (5 months ago)
- Language: TypeScript
- Size: 1.03 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Is Repo
[](https://travis-ci.com/krmax44/is-repo)
[](https://packagephobia.now.sh/result?p=is-repo)
[](https://www.npmjs.com/package/is-repo)Determines whether a given path is a Git repository. Uses `git rev-parse --is-inside-work-tree`.
## Installation
```bash
yarn add is-repo
# or with npm
npm i is-repo
```## Usage
Very simple.
```js
import isRepo from 'is-repo';await isRepo(); // defaults to process.cwd()
await isRepo('path/to/repo'); // true || false
```