Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
require('babel/register');
var extend = require('extend');
var mocha = require('mocha');
var ripplelib = require('ripple-lib');
// Optionally use a more useful (but noisy) logger
if (process.env.USE_RCONSOLE) {
require('rconsole');
};
// Stash a reference away to this
extend(ripplelib, ripplelib._DEPRECATED);
var config = ripplelib.config = {
load: function (newOpts) {
extend(ripplelib.config, newOpts);
return config;
}
}
// camelCase to under_scored API conversion
function attachUnderscored(c) {
var o = ripplelib[c];
Object.keys(o.prototype).forEach(function(key) {
var UPPERCASE = /([A-Z]{1})[a-z]+/g;
if (!UPPERCASE.test(key)) {
return;
}
load: function (newOpts) {
extend(ripplelib.config, newOpts);
return config;
}
}
function init_config() {
return require('ripple-lib').config.load(get_config());
};
function init_config() {
return require('ripple-lib').config.load(get_config());
};