Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krmax44/is-repo
Determines whether a given path is a Git repository.
https://github.com/krmax44/is-repo
Last synced: 10 days 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T14:01:29.000Z (almost 3 years ago)
- Last Synced: 2024-12-11T07:17:45.582Z (about 1 month 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
[![Build Status](https://travis-ci.com/krmax44/is-repo.svg?branch=master)](https://travis-ci.com/krmax44/is-repo)
[![install size](https://packagephobia.now.sh/badge?p=is-repo)](https://packagephobia.now.sh/result?p=is-repo)
[![npm version](https://img.shields.io/npm/v/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
```