montanaflynn/human-date — pull request #2 by Nijikokun (2014-11-18 05:41:14+00:00)
Title: Scope / check cleanup, single declaration

Cleaned up a few things, mostly scope related, as declaring variables inside of `if` statements and using them outside is worse than just declaring them to begin with, and poses absolutely no performance issues by declaring them especially should they be unused.

Declaring months a single time, so that way it doesn't need to be created every time and can be easily changed from outside, same should probably go for years, seconds, days, hours, minutes, etc...

Absolute checks as NaN would return the opposite anyway: `NaN != 0` would be true, and for the other check it would be false.

All tests pass.