fetch-git-config

1.1.1 • Public • Published

#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'});

Readme

Keywords

Package Sidebar

Install

npm i fetch-git-config

Weekly Downloads

0

Version

1.1.1

License

MIT

Last publish

Collaborators

  • huang.xinghui