code: function filterLeaks(ok, globals) {
    return filter(globals, function(key){
      var matched = filter(ok, function(ok){
        if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]);
        // Opera and IE expose global variables for HTML element IDs (issue #243)
        if (/^mocha-/.test(key)) return true;
        return key == ok;
      });
      return matched.length == 0 && (!global.navigator || 'onerror' !== key);
    });
  }
docs: Filter leaks with the given globals flagged as `ok`.
  
  @param {Array} ok
  @param {Array} globals
  @return {Array}
  @api private