News for hackers. Stuff that matters.
Re:BitPay introduces Bitcore by rakoo on Friday February 14, 2014 @05:15PM (#7241383)
I find it strange to use try/catch to validate an address. I'd expect the validate function to return true/false.

Is there more doc ? This could be interesting.

Re:BitPay introduces Bitcore by Guvante on Friday February 14, 2014 @05:19PM (#7241407)
It looks like the intended use is to simply call validate and ignore the result, allowing you to assume from then on it is a valid address.

In theory they should provide a "TryValidate" or similar but it doesn't look like they do at the moment.

Re:BitPay introduces Bitcore by stith on Saturday February 15, 2014 @12:55PM (#7244556)
I find that really strange as well. I haven't seen a Node library that uses exceptions for flow control before this, I wonder why they decided to start here.