/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['utils.js']) {
  _$jscoverage['utils.js'] = [];
  _$jscoverage['utils.js'][12] = 0;
  _$jscoverage['utils.js'][22] = 0;
  _$jscoverage['utils.js'][23] = 0;
  _$jscoverage['utils.js'][24] = 0;
  _$jscoverage['utils.js'][35] = 0;
  _$jscoverage['utils.js'][36] = 0;
  _$jscoverage['utils.js'][38] = 0;
  _$jscoverage['utils.js'][39] = 0;
  _$jscoverage['utils.js'][40] = 0;
  _$jscoverage['utils.js'][42] = 0;
  _$jscoverage['utils.js'][45] = 0;
  _$jscoverage['utils.js'][58] = 0;
  _$jscoverage['utils.js'][60] = 0;
  _$jscoverage['utils.js'][63] = 0;
  _$jscoverage['utils.js'][66] = 0;
  _$jscoverage['utils.js'][69] = 0;
  _$jscoverage['utils.js'][74] = 0;
  _$jscoverage['utils.js'][75] = 0;
  _$jscoverage['utils.js'][76] = 0;
  _$jscoverage['utils.js'][79] = 0;
  _$jscoverage['utils.js'][91] = 0;
  _$jscoverage['utils.js'][92] = 0;
  _$jscoverage['utils.js'][108] = 0;
  _$jscoverage['utils.js'][109] = 0;
  _$jscoverage['utils.js'][112] = 0;
  _$jscoverage['utils.js'][113] = 0;
  _$jscoverage['utils.js'][114] = 0;
  _$jscoverage['utils.js'][115] = 0;
  _$jscoverage['utils.js'][129] = 0;
  _$jscoverage['utils.js'][130] = 0;
  _$jscoverage['utils.js'][134] = 0;
  _$jscoverage['utils.js'][137] = 0;
  _$jscoverage['utils.js'][150] = 0;
  _$jscoverage['utils.js'][151] = 0;
  _$jscoverage['utils.js'][154] = 0;
  _$jscoverage['utils.js'][158] = 0;
  _$jscoverage['utils.js'][169] = 0;
  _$jscoverage['utils.js'][170] = 0;
}
_$jscoverage['utils.js'][12]++;
var mime = require("mime");
_$jscoverage['utils.js'][22]++;
exports.isAbsolute = (function (path) {
  _$jscoverage['utils.js'][23]++;
  if ("/" == path[0]) {
    _$jscoverage['utils.js'][23]++;
    return true;
  }
  _$jscoverage['utils.js'][24]++;
  if (":" == path[1] && "\\" == path[2]) {
    _$jscoverage['utils.js'][24]++;
    return true;
  }
});
_$jscoverage['utils.js'][35]++;
exports.flatten = (function (arr, ret) {
  _$jscoverage['utils.js'][36]++;
  var ret = ret || [], len = arr.length;
  _$jscoverage['utils.js'][38]++;
  for (var i = 0; i < len; ++i) {
    _$jscoverage['utils.js'][39]++;
    if (Array.isArray(arr[i])) {
      _$jscoverage['utils.js'][40]++;
      exports.flatten(arr[i], ret);
    }
    else {
      _$jscoverage['utils.js'][42]++;
      ret.push(arr[i]);
    }
}
  _$jscoverage['utils.js'][45]++;
  return ret;
});
_$jscoverage['utils.js'][58]++;
exports.accepts = (function (type, str) {
  _$jscoverage['utils.js'][60]++;
  if (! str) {
    _$jscoverage['utils.js'][60]++;
    return true;
  }
  _$jscoverage['utils.js'][63]++;
  if (! ~ type.indexOf("/")) {
    _$jscoverage['utils.js'][63]++;
    type = mime.lookup(type);
  }
  _$jscoverage['utils.js'][66]++;
  type = type.split("/");
  _$jscoverage['utils.js'][69]++;
  var accepted = exports.parseAccept(str), len = accepted.length, obj, ok;
  _$jscoverage['utils.js'][74]++;
  for (var i = 0; i < len; ++i) {
    _$jscoverage['utils.js'][75]++;
    obj = accepted[i];
    _$jscoverage['utils.js'][76]++;
    if (exports.accept(type, obj)) {
      _$jscoverage['utils.js'][76]++;
      return true;
    }
}
  _$jscoverage['utils.js'][79]++;
  return false;
});
_$jscoverage['utils.js'][91]++;
exports.accept = (function (type, other) {
  _$jscoverage['utils.js'][92]++;
  return (type[0] == other.type || "*" == other.type) && (type[1] == other.subtype || "*" == other.subtype);
});
_$jscoverage['utils.js'][108]++;
exports.parseAccept = (function (str) {
  _$jscoverage['utils.js'][109]++;
  return exports.parseQuality(str).map((function (obj) {
  _$jscoverage['utils.js'][112]++;
  var parts = obj.value.split("/");
  _$jscoverage['utils.js'][113]++;
  obj.type = parts[0];
  _$jscoverage['utils.js'][114]++;
  obj.subtype = parts[1];
  _$jscoverage['utils.js'][115]++;
  return obj;
}));
});
_$jscoverage['utils.js'][129]++;
exports.parseQuality = (function (str) {
  _$jscoverage['utils.js'][130]++;
  return str.split(/ *, */).map(quality).filter((function (obj) {
  _$jscoverage['utils.js'][134]++;
  return obj.quality;
})).sort((function (a, b) {
  _$jscoverage['utils.js'][137]++;
  return b.quality - a.quality;
}));
});
_$jscoverage['utils.js'][150]++;
function quality(str) {
  _$jscoverage['utils.js'][151]++;
  var parts = str.split(/ *; */), val = parts[0];
  _$jscoverage['utils.js'][154]++;
  var q = parts[1]? parseFloat(parts[1].split(/ *= */)[1]): 1;
  _$jscoverage['utils.js'][158]++;
  return ({value: val, quality: q});
}
_$jscoverage['utils.js'][169]++;
exports.escape = (function (html) {
  _$jscoverage['utils.js'][170]++;
  return String(html).replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
});
_$jscoverage['utils.js'].source = ["","/*!"," * Express - utils"," * Copyright(c) 2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var mime = require('mime');","","/**"," * Check if `path` looks absolute."," *"," * @param {String} path"," * @return {Boolean}"," * @api private"," */","","exports.isAbsolute = function(path){","  if ('/' == path[0]) return true;","  if (':' == path[1] &amp;&amp; '\\\\' == path[2]) return true;","};","","/**"," * Flatten the given `arr`."," *"," * @param {Array} arr"," * @return {Array}"," * @api private"," */","","exports.flatten = function(arr, ret){","  var ret = ret || []","    , len = arr.length;","  for (var i = 0; i &lt; len; ++i) {","    if (Array.isArray(arr[i])) {","      exports.flatten(arr[i], ret);","    } else {","      ret.push(arr[i]);","    }","  }","  return ret;","};","","/**"," * Check if `type` is acceptable based on"," * the given `str`."," *"," * @param {String} type"," * @param {String} str"," * @return {Boolean}"," * @api private"," */","","exports.accepts = function(type, str){","  // accept anything when Accept is not present","  if (!str) return true;","","  // resolve mime","  if (!~type.indexOf('/')) type = mime.lookup(type);","","  // split type/subtype","  type = type.split('/');","","  // parse","  var accepted = exports.parseAccept(str)","    , len = accepted.length","    , obj","    , ok;","","  for (var i = 0; i &lt; len; ++i) {","    obj = accepted[i];","    if (exports.accept(type, obj)) return true;","  }","","  return false;","};","","/**"," * Check if `type` array is acceptable for `other`."," *"," * @param {Array} type"," * @param {Object} other"," * @return {Boolean}"," * @api private"," */","","exports.accept = function(type, other){","  return (type[0] == other.type || '*' == other.type)","    &amp;&amp; (type[1] == other.subtype || '*' == other.subtype);","};","","/**"," * Parse accept `str`, returning"," * an array objects containing"," * `.type` and `.subtype` along"," * with the values provided by"," * `parseQuality()`."," *"," * @param {Type} name"," * @return {Type}"," * @api private"," */","","exports.parseAccept = function(str){","  return exports","    .parseQuality(str)","    .map(function(obj){","      var parts = obj.value.split('/');","      obj.type = parts[0];","      obj.subtype = parts[1];","      return obj;","    });","};","","/**"," * Parse quality `str`, returning an"," * array of objects with `.value` and"," * `.quality`."," *"," * @param {Type} name"," * @return {Type}"," * @api private"," */","","exports.parseQuality = function(str){","  return str","    .split(/ *, */)","    .map(quality)","    .filter(function(obj){","      return obj.quality;","    })","    .sort(function(a, b){","      return b.quality - a.quality;","    });","};","","/**"," * Parse quality `str` returning an"," * object with `.value` and `.quality`."," *"," * @param {String} str"," * @return {Object}"," * @api private"," */","","function quality(str) {","  var parts = str.split(/ *; */)","    , val = parts[0];","","  var q = parts[1]","    ? parseFloat(parts[1].split(/ *= */)[1])","    : 1;","","  return { value: val, quality: q };","}","","/**"," * Escape special characters in the given string of html."," *"," * @param  {String} html"," * @return {String}"," * @api private"," */","","exports.escape = function(html) {","  return String(html)","    .replace(/&amp;/g, '&amp;amp;')","    .replace(/\"/g, '&amp;quot;')","    .replace(/&lt;/g, '&amp;lt;')","    .replace(/&gt;/g, '&amp;gt;');","};"];
