2015-02-27 14:57:25 +00:00
|
|
|
/* jshint ignore:start */
|
2015-02-27 13:05:00 +00:00
|
|
|
|
2015-06-17 10:41:25 +00:00
|
|
|
|
|
|
|
// Browser environment
|
|
|
|
if(typeof window !== 'undefined') {
|
2015-06-17 15:32:36 +00:00
|
|
|
web3 = (typeof window.web3 !== 'undefined') ? window.web3 : require('web3');
|
|
|
|
BigNumber = (typeof window.BigNumber !== 'undefined') ? window.BigNumber : require('bignumber.js');
|
2015-06-17 10:41:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Node environment
|
|
|
|
if(typeof global !== 'undefined') {
|
2015-06-17 15:32:36 +00:00
|
|
|
web3 = (typeof global.web3 !== 'undefined') ? global.web3 : require('web3');
|
|
|
|
BigNumber = (typeof global.BigNumber !== 'undefined') ? global.BigNumber : require('bignumber.js');
|
2015-02-27 14:57:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jshint ignore:end */
|