Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix ini files for memory loadFrom option #62

Merged
merged 1 commit into from

2 participants

Christian Tellnes Pavan Kumar Sunkara
Christian Tellnes

make it possible to use other formats than json in common.loadFiles and common.loadFilesSync

Pavan Kumar Sunkara pksunkara merged commit 2ba4378 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 16, 2012
  1. Christian Tellnes
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/nconf/common.js
4 lib/nconf/common.js
View
@@ -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));
});
};
@@ -80,7 +80,7 @@ common.loadFilesSync = function (files) {
var options = Array.isArray(files) ? { files: files } : files;
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'));
}));
};
Something went wrong with that request. Please try again.