fetch-git-config
v1.1.1
Published
fetch user's local or global .gitconfig
Downloads
7
Readme
#fetch-git-config
fetch user's local or global .gitconfig
Install
Node.js 4 or higher
$ npm install fetch-git-config --save
Usage
fetch current working directory
var fetch = require('fetch-git-config');
// async
fetch().then(function(data) {
// do something
});
// sync
var data = fetch.sync();
// do something
fetch global
// async
fetch('global').then(function(data) {
// do something
});
// sync
var data = fetch.sync('global');
fetch custom path and cwd
// async
fetch({cwd: 'foo', path: '.git/config'}).then(function(data) {
// do something
});
// sync
var data = fetch.sync({cwd: 'foo', path: '.git/config'});