visionmedia/should.js — pull request #173 by tonylukasavage (2014-01-27 19:51:35+00:00)
Title: Fixes HTMLElement check error in DOM-less environments

When the check for `HTMLElement` was relaxed ([33331c92834106846196a1bf1c59ee032990ab81](https://github.com/visionmedia/should.js/commit/33331c92834106846196a1bf1c59ee032990ab81)), it inadvertently made the should.js browser-compatible version unusable in environments without a DOM. The prior `typeof` check made it safe. I know, it sounds like a worthless note, but [Appcelerator's Titanium](http://www.appcelerator.com/titanium/) was able to make full use of should.js before this commit. Now without a patch of some sort it cannot, ending in undefined exceptions.

I understand that the purpose of the single-file should.js is to support the browser. I humbly request, though, that unless the commit which relaxed the `HTMLElement` check was critical for some reason I am unaware of, please consider accepting this PR so that the Titanium community can continue using it in its unit testing suites again.

All tests passing.