npm.io
1.0.1 • Published 10 years ago

git-remote-url

Licence
Apache-2.0
Version
1.0.1
Deps
1
Vulns
0
Weekly
0
Stars
1

git-remote-url

Get a remote URL of a git repository

Build Status dependencies 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

var gitRemoteUrl = require('git-remote-url');

gitRemoteUrl('.', 'origin').then(function(url) {
  console.log('URL is ' + url);
});

Keywords