docs: function (filename, types) {
      types = types.split(',');
      var pattern = '\.(';
      for (var i = 0; i < types.length; i++) {
          if (0 != i) {
              pattern += '|';
          }
          pattern += types[i].trim();
      }
      pattern += ')$';
      return new RegExp(pattern, 'i').test(filename);
  }