binaryjs/js-binarypack — pull request #6 by orcaman (2014-09-28 11:54:17+00:00)
Title: check if window is defined before accessing window props

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).