# @iyowei/get-git-repo-url

> 异步获取指定 Git 项目远程仓库地址。

Latest version **1.0.1** (published 2021-12-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @iyowei/get-git-repo-url
pnpm add @iyowei/get-git-repo-url
yarn add @iyowei/get-git-repo-url
bun add @iyowei/get-git-repo-url
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-12-18 |
| First published | 2021-12-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=12.20.0 |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | itonyyo |
| Keywords | iyowei |

## Links

- npm: https://www.npmjs.com/package/@iyowei/get-git-repo-url
- Repository: https://github.com/iyowei/get-git-repo-url
- Homepage: https://github.com/iyowei/get-git-repo-url#readme
- Issues: https://github.com/iyowei/get-git-repo-url/issues
- npm.io page: https://npm.io/package/@iyowei/get-git-repo-url

## Recent versions

- 1.0.1 (latest) — 2021-12-18
- 1.0.0 — 2021-12-13

## README

[@iyowei/get-git-repo-url-sync]: #
[@iyowei/p-get-git-repo-url]: #



# getGitRepoUrl(path, callback)

> **异步** 获取指定 Git 项目远程仓库地址。

## 使用

- path {String} 工作路径，**默认：** `""`；
- callback {Function}，
  - err {Error} 错误信息，没发生错误，则返回 `false`；
  - url {String | Null} 远程 Git 仓库地址。

```javascript
import getGitRepoUrl from '@iyowei/get-git-repo-url';

getGitRepoUrl(process.cwd(), (err, url) => {
  if (!err) {
    console.log(url);
    return;
  }

  throw err;
});
```

## 安装

[![Node version](https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js)](https://nodejs.org/en/download/)

```shell
# Pnpm
pnpm add @iyowei/get-git-repo-url

# yarn
yarn add @iyowei/get-git-repo-url

# npm
npm add @iyowei/get-git-repo-url
```

## 相关

- [@iyowei/get-git-repo-url-sync][@iyowei/get-git-repo-url-sync], 串行实现；
- [@iyowei/p-get-git-repo-url][@iyowei/p-get-git-repo-url]，并行接口，Promise 版。

## 参与贡献
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)

---
_Source: https://npm.io/package/@iyowei/get-git-repo-url · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
