alex-seville/blanket — pull request #351 by yannickcr (2013-11-20 11:00:47+00:00)
Title: Add support for shebang

Blanket currently fail if it encounter a JavaScript file with a [shebang](https://en.wikipedia.org/wiki/Shebang_%28Unix%29) like `#!/usr/bin/env node` and that makes it unable to cover a node shell script.

The reason is that the [esprima](http://esprima.org) module do not ignore the shebang at the top of the files and, according to the author, [it do not plan to as the shebang is not part of the ECMA-262](http://code.google.com/p/esprima/issues/detail?id=463).

So blanket should handle it properly before sending the source code to esprima.

This patch remove the shebang (if any) before source code instrumentation but keeps it in the sourceArray so it should be transparent for the user.

A new test was also added in test/test-node/tests/blanket_core.js