JS: Added ripple.config.load convenience function.

This commit is contained in:
Stefan Thomas
2013-02-02 14:05:37 +01:00
parent 4e526c78e6
commit 39ba2613d9
12 changed files with 37 additions and 45 deletions

View File

@@ -1,3 +1,10 @@
// This object serves as a singleton to store config options
module.exports = {};
var extend = require("extend");
var config = module.exports = {
load: function (newOpts) {
extend(config, newOpts);
return config;
}
};

View File

@@ -11,3 +11,5 @@ exports.Seed = require('./amount').Seed;
// the official client, it makes sense to expose the SJCL instance so we don't
// have to include it twice.
exports.sjcl = require('../../build/sjcl');
exports.config = require('./config');