New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

git-remote-url

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-remote-url - npm Package Compare versions

Comparing version

to
1.0.1

2

package.json
{
"name": "git-remote-url",
"version": "1.0.0",
"version": "1.0.1",
"description": "Get a remote URL of a git repository",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,1 +7,21 @@ # git-remote-url

[![devdependencies](https://david-dm.org/marco-c/git-remote-url/dev-status.svg)](https://david-dm.org/marco-c/git-remote-url#info=devDependencies)
# API
The function exported by the module accepts two parameters:
- `directory`: the directory of the git repository;
- `remote`: the name of the remote you're interested in.
It returns a promise that resolves to the URL of the remote.
# Example
```JavaScript
var gitRemoteUrl = require('git-remote-url');
gitRemoteUrl('.', 'origin').then(function(url) {
console.log('URL is ' + url);
});
```