binaryjs/js-binarypack — pull request #7 by orcaman (2014-09-28 12:01:00+00:00)
Title: check existence of window before referencing it to allow mocha tests to pass

if you do not check that "window" exists, then a mocha test referencing this JS will fail immediately, claiming that "window" is undefined (even though the js-binarypack module is not used - the mere presence of the window.someProperty makes mocha angry).