bitpay/bitcore — pull request #123 by backus (2014-03-10 03:02:03+00:00)
Title: Change `new Address` to `Address.new`

Documentation says `new Address(...)` but following the examples produces

return new Address(addr);
^
TypeError: object is not a function
at /Users/johnbackus/bitcore-testing/validate-example-broken.js:9:10
at Array.map (native)
at Object. (/Users/johnbackus/bitcore-testing/validate-example-broken.js:8:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3

Changing `new Address` to `Address.new` fixes this. From the "Validating an address" example:
```shell
$ node validate-example-broken.js

/Users/johnbackus/bitcore-testing/validate-example-broken.js:9
return new Address(addr);
^
TypeError: object is not a function
at /Users/johnbackus/bitcore-testing/validate-example-broken.js:9:10
at Array.map (native)
at Object. (/Users/johnbackus/bitcore-testing/validate-example-broken.js:8:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3

$ node validate-example-fix.js
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa: is valid
1A1zP1eP5QGefi2DMPTfTL5SLmv7Dixxxx: is not a valid address. Error: checksum mismatch
A1zP1eP5QGefi2DMPTfTL5SLmv7Dixxxx: is not a valid address. Error: checksum mismatch
1600 Pennsylvania Ave NW: is not a valid address. TypeError: Unspecified operation for type undefined for add

$ diff validate-example-broken.js validate-example-fix.js
9c9
< return new Address(addr);
---
> return Address.new(addr);
```