How to use the ripple-lib.config function in ripple-lib

To help you get started, we’ve selected a few ripple-lib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ripple / rippled / test / mocha-loader-patch.js View on Github external
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;
    }
github ripple / rippled / test / mocha-loader-patch.js View on Github external
load: function (newOpts) {
    extend(ripplelib.config, newOpts);
    return config;
  }
}
github ripple / rippled / test / testutils.js View on Github external
function init_config() {
  return require('ripple-lib').config.load(get_config());
};
github radrbiz / radard / test / testutils.js View on Github external
function init_config() {
  return require('ripple-lib').config.load(get_config());
};