diff --git a/src/core/index.js b/src/core/index.js index 3c31033f..3a833799 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -37,31 +37,3 @@ exports._test = { exports.sjcl = require('./utils').sjcl; exports.Wallet = require('ripple-wallet-generator')({sjcl: exports.sjcl}); exports.types = require('./serializedtypes'); - -// camelCase to under_scored API conversion -function attachUnderscored(name) { - const o = exports[name]; - - Object.keys(o.prototype).forEach(function(key) { - const UPPERCASE = /([A-Z]{1})[a-z]+/g; - - if (!UPPERCASE.test(key)) { - return; - } - - const underscored = key.replace(UPPERCASE, function(c) { - return '_' + c.toLowerCase(); - }); - - o.prototype[underscored] = o.prototype[key]; - }); -} - -['Remote', - 'Request', - 'Transaction', - 'Account', - 'Server' -].forEach(attachUnderscored); - -// vim:sw=2:sts=2:ts=8:et diff --git a/src/index.js b/src/index.js index cb12f301..fe75bdc1 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,8 @@ 'use strict'; -const _ = require('lodash'); const core = require('./core'); const RippleAPI = require('./api'); -module.exports = _.assign({}, core, {RippleAPI: RippleAPI}); +module.exports = { + RippleAPI, + _DEPRECATED: core // WARNING: this will be removed soon +}; diff --git a/test/api-test.js b/test/api-test.js index 3d72af41..c7433c9d 100644 --- a/test/api-test.js +++ b/test/api-test.js @@ -11,7 +11,7 @@ const responses = fixtures.responses; const addresses = require('./fixtures/addresses'); const hashes = require('./fixtures/hashes'); const MockPRNG = require('./mock-prng'); -const sjcl = require('../src').sjcl; +const sjcl = require('../src/core').sjcl; const address = addresses.ACCOUNT; const common = require('../src/api/common'); const validate = common.validate; diff --git a/test/node_modules/ripple-lib b/test/node_modules/ripple-lib index a8d2a675..67e69782 120000 --- a/test/node_modules/ripple-lib +++ b/test/node_modules/ripple-lib @@ -1 +1 @@ -../../src/ \ No newline at end of file +../../src/core \ No newline at end of file