web3.js/package-init.js

17 lines
543 B
JavaScript
Raw Normal View History

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