Sync latest parse-git-config api changes

This commit is contained in:
LexSwed
2018-08-05 16:35:45 +03:00
parent 9c32df15f4
commit 5c3924cd39
2 changed files with 6 additions and 6 deletions

View File

@@ -36,10 +36,10 @@ interface Parse {
* If no arguments are passed, the .git/config file relative to process.cwd() is used.
*/
sync(options?: (Options | object) | string): Config;
/**
* Returns an object with only the properties that had ini-style keys converted to objects.
*/
keys(config: Config): Config;
/**
* Returns an object with only the properties that had ini-style keys converted to objects.
*/
expandKeys(config: Config): Config;
}
// no-empty-interface is disabled for a better debugging experience. Empty interfaces are used to alias a type alias.

View File

@@ -99,12 +99,12 @@ function test_sync() {
}
}
function test_keys() {
function test_expandKeys() {
const config = {
'foo "bar"': { doStuff: true },
'foo "baz"': { doStuff: true }
};
const keys = parse.keys(config);
const keys = parse.expandKeys(config);
keys.foo.bar.doStuff === true;
keys.foo.baz.doStuff === true;