chriszarate/supergenpass-lib — pull request #9 by denis-sokolov (2014-04-30 11:02:29+00:00)
Title: Simplify isolateDomain API

I suggest renaming the method for aestetic reasons and simplicity.

I suggest the options object for the following reasons:

1. Flag parameters are suboptimal because they read poorly. In your own example you are forced to use a temporary variable to explain what is happening. In tests, however, you do not do that, and we have the popular result where there is a meaningless `false` or `true`, that is hard to understand.

2. `disableTLD` is an option. It is easy to imagine the `hostname` API getting more options in the future.
In such a case having a mandatory second argument will be harmful.

3. There is a certain beauty in API matching the main API, isn't there?