bitcoinjs/bitcoinjs-lib — pull request #176 by dcousens (2014-05-10 01:48:30+00:00)
Title: Mass Rename

Depends on #175.

This pull request changes all intentionally instantiable classes use PascalCase by default, and adheres to the common idiom of 1 class per file.

It also cleans up all the imports/`require`s to adhere to this; using the `require(PACKAGE).Module` format as discussed in https://github.com/bitcoinjs/bitcoinjs-lib/issues/106.

Whether that is the right decision is up for debate, but it is naturally how our users will use the library, so I don't see any reason not to.

One of the main points against this format is that it is not the minimal form of what is required:
> Still require('./') is over-importing - require ALL THE THINGS but I only use `Address`.

But I would argue that it is not unreasonable, because it is not like we do `require('./node_modules/crypto-js/ripemd160.js')` for other modules.
And testing is usually done on top of the API, not within it.