parse-git-config
Advanced tools
Comparing version 1.0.2 to 1.1.0
24
index.js
@@ -95,24 +95,8 @@ /*! | ||
parse.resolve = function resolve(options) { | ||
var isGlobal = false; | ||
if (options === 'global') { | ||
isGlobal = true; | ||
options = {}; | ||
} | ||
if (typeof options === 'string') { | ||
options = { path: options }; | ||
options = { type: options }; | ||
} | ||
// if "global" isn't explicitly defined, let | ||
// `git-config-path` determine the path | ||
var type = isGlobal ? 'global' : null; | ||
var opts = extend({path: configPath(type)}, options); | ||
if (opts.path && exists(opts.path)) { | ||
return opts.path; | ||
} | ||
if (opts.cwd && opts.path) { | ||
return path.resolve(opts.cwd, opts.path); | ||
} | ||
return opts.path && path.resolve(opts.path); | ||
var opts = extend({cwd: process.cwd()}, options); | ||
var fp = opts.path || configPath(opts.type); | ||
return path.resolve(opts.cwd, fp); | ||
}; | ||
@@ -119,0 +103,0 @@ |
{ | ||
"name": "parse-git-config", | ||
"description": "Parse `.git/config` into a JavaScript object. sync or async.", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"homepage": "https://github.com/jonschlinkert/parse-git-config", | ||
@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", |
@@ -92,3 +92,3 @@ # parse-git-config [](https://www.npmjs.com/package/parse-git-config) [](https://npmjs.org/package/parse-git-config) [](https://npmjs.org/package/parse-git-config) [](https://travis-ci.org/jonschlinkert/parse-git-config) | ||
### [.keys](index.js#L133) | ||
### [.keys](index.js#L117) | ||
@@ -202,3 +202,3 @@ Returns an object with only the properties that had ini-style keys converted to objects (example below). | ||
| --- | --- | | ||
| 41 | [jonschlinkert](https://github.com/jonschlinkert) | | ||
| 44 | [jonschlinkert](https://github.com/jonschlinkert) | | ||
| 1 | [sam3d](https://github.com/sam3d) | | ||
@@ -239,2 +239,2 @@ | 1 | [jsdnxx](https://github.com/jsdnxx) | | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 26, 2016._ | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on December 08, 2016._ |
13118
117