https://github.com/fishbar/jscoverage/blob/master/lib/jscoverage.js#L36 ``` js if (typeof global === 'object') { BASE = global; } else if (typeof window === 'object') { BASE = window; } else { throw new Error('[jscoverage] unknow ENV!'); } ``` when my code has variable `window`, ``` js var window = this; // this ref to window. console.log(typeof window); ``` will console log `object` run in node, build as cmd module and run in web, or run in phantom. but throw error `[jscoverage] unknow ENV!` here, why? ## ref - https://github.com/spmjs/spm/issues/1020 - https://github.com/hotoo/detector/blob/master/detector.js#L4