felixge/node-sandboxed-module — pull request #31 by robrich (2014-05-07 21:46:51+00:00)
Title: Use both the '$$cov_*' and istanbul's default `__coverage__` var to see if istanbul is running

Currently it's only looking for the $$cov_ global variable to know if istanbul is running. If you use istanbul programmatically, it doesn't instantiate $$cov_ but uses the default `__coverage__` var. (see https://github.com/gotwarlost/istanbul/blob/master/lib/instrumenter.js#L340) A great example of using istanbul programatically is https://www.npmjs.org/package/gulp-istanbul.