Closed tacticalchihuahua closed 10 years ago
ping for review by @martindale or @pnagurny
I did this to mimic the more standard approach for node.js libs. You can also do:
var client = new bitpay.Client()
I felt it was better to export an object than just the single constructor, since we will likely add more tools to the exports.
Ah, so an updated pattern (which feels like Bitcore, might be desirable) would be:
var BitPay = require('bitpay').Client;
var bitpay = new BitPay( ... );
This feels reasonable, and might even allow var bitpay = require('bitpay').Server
in the future. Neat.
i'm looking at you, @martindale