diff --git a/lib/nconf.js b/lib/nconf.js index 26f6286d..0d59c91f 100644 --- a/lib/nconf.js +++ b/lib/nconf.js @@ -21,12 +21,24 @@ nconf.version = require('../package.json').version; // // Setup all stores as lazy-loaded getters. // -['argv', 'env', 'file', 'literal', 'memory'].forEach(function (store) { - var name = common.capitalize(store); +nconf.__defineGetter__('Argv', function () { + return require('./nconf/stores/argv').Argv; +}); + +nconf.__defineGetter__('Env', function () { + return require('./nconf/stores/env').Env; +}); + +nconf.__defineGetter__('File', function () { + return require('./nconf/stores/file').File; +}); + +nconf.__defineGetter__('Literal', function () { + return require('./nconf/stores/literal').Literal; +}); - nconf.__defineGetter__(name, function () { - return require('./nconf/stores/' + store)[name]; - }); +nconf.__defineGetter__('Memory', function () { + return require('./nconf/stores/memory').Memory; }); //