Merge pull request #62 from tellnes/loadFrom
Fix ini files for memory loadFrom option
This commit is contained in:
commit
2ba437807a
1 changed files with 2 additions and 2 deletions
|
@ -58,7 +58,7 @@ common.loadFiles = function (files, callback) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async.map(files, parseFile, function (err, objs) {
|
async.map(options.files, parseFile, function (err, objs) {
|
||||||
return err ? callback(err) : callback(null, common.merge(objs));
|
return err ? callback(err) : callback(null, common.merge(objs));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -80,7 +80,7 @@ common.loadFilesSync = function (files) {
|
||||||
var options = Array.isArray(files) ? { files: files } : files;
|
var options = Array.isArray(files) ? { files: files } : files;
|
||||||
options.format = options.format || formats.json;
|
options.format = options.format || formats.json;
|
||||||
|
|
||||||
return common.merge(files.map(function (file) {
|
return common.merge(options.files.map(function (file) {
|
||||||
return options.format.parse(fs.readFileSync(file, 'utf8'));
|
return options.format.parse(fs.readFileSync(file, 'utf8'));
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue