code: function terminator(routes, delimiter, start, stop) {
    var last = 0,
        left = 0,
        right = 0,
        start = (start || '(').toString(),
        stop = (stop || ')').toString(),
        i;
  
    for (i = 0; i < routes.length; i++) {
      var chunk = routes[i];
  
      if ((chunk.indexOf(start, last) > chunk.indexOf(stop, last)) ||
          (~chunk.indexOf(start, last) && !~chunk.indexOf(stop, last)) ||
          (!~chunk.indexOf(start, last) && ~chunk.indexOf(stop, last))) {
  
        left = chunk.indexOf(start, last);
        right = chunk.indexOf(stop, last);
  
        if ((~left && !~right) || (!~left && ~right)) {
          var tmp = routes.slice(0, (i || 1) + 1).join(delimiter);
          routes = [tmp].concat(routes.slice((i || 1) + 1));
        }
  
        last = (right > left ? right : left) + 1;
        i = 0;
      }
      else {
        last = 0;
      }
    }
  
    return routes;
  }
docs: ### Fix unterminated RegExp groups in routes.