8 changed files with 40 additions and 14 deletions
@ -0,0 +1,15 @@ |
|||||
|
/* |
||||
|
* Bitcore bindings for the browser |
||||
|
*/ |
||||
|
|
||||
|
|
||||
|
module.exports.bignum = require('bignum'); |
||||
|
module.exports.base58 = require('base58-native'); |
||||
|
//module.exports.Address = require('./Address');
|
||||
|
|
||||
|
|
||||
|
|
||||
|
if (typeof process.versions === 'undefined') { |
||||
|
module.exports.bignum.config({EXPONENTIAL_AT: 9999999, DECIMAL_PLACES: 0, ROUNDING_MODE: 1}); |
||||
|
} |
||||
|
|
@ -1,9 +0,0 @@ |
|||||
/* |
|
||||
* Bitcore bindings for the browser |
|
||||
*/ |
|
||||
|
|
||||
module.exports.bignum = require('bignum'); |
|
||||
module.exports.base58 = require('base58-native'); |
|
||||
|
|
||||
module.exports.bignum.config({EXPONENTIAL_AT: 9999999, DECIMAL_PLACES: 0, ROUNDING_MODE: 1}); |
|
||||
|
|
@ -0,0 +1,17 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
if (typeof require === 'undefined') { |
||||
|
var that = this; |
||||
|
that.require = function(name) { |
||||
|
var split = name.split('/'); |
||||
|
if (split.length > 0) { |
||||
|
name = split.pop(); |
||||
|
} |
||||
|
var module = that[name]; |
||||
|
if (!module) { |
||||
|
throw new Error('Cannot find module "'+name+'"'); |
||||
|
} |
||||
|
return module; |
||||
|
}; |
||||
|
|
||||
|
} |
Loading…
Reference in new issue