index.js
function reduceStack(path, items, item) {
      var nextPath;

      if (item.handle && item.handle.stack) {
        nextPath = join(path, (item.path || helpers.unescapeRegex(item.regexp) || ''));
        return items.concat(item.handle.stack.reduce(reduceStack.bind(null, nextPath), []));
      }

      if (item.route) {
        nextPath = join(path, (item.route.path || ''));
        return items.concat(item.route.stack.reduce(reduceStack.bind(null, nextPath), []));
      }

      return items.concat({
        handle: item.handle,
        path: path
      });
    }
function reduceStack(path, items, item) {
      var nextPath;

      if (item.handle && item.handle.stack) {
        nextPath = join(path, (item.path || helpers.unescapeRegex(item.regexp) || ''));
        return items.concat(item.handle.stack.reduce(reduceStack.bind(null, nextPath), []));
      }

      if (item.route) {
        nextPath = join(path, (item.route.path || ''));
        return items.concat(item.route.stack.reduce(reduceStack.bind(null, nextPath), []));
      }

      return items.concat({
        handle: item.handle,
        path: path
      });
    }
function reduceStack ( path , items , item ) { var nextPath ; if ( item . handle && item . handle . stack ) { nextPath = join ( path , ( item . path || helpers . unescapeRegex ( item . regexp ) || '' ) ) ; return items . concat ( item . handle . stack . reduce ( reduceStack . bind ( null , nextPath ) , [ ] ) ) ; } if ( item . route ) { nextPath = join ( path , ( item . route . path || '' ) ) ; return items . concat ( item . route . stack . reduce ( reduceStack . bind ( null , nextPath ) , [ ] ) ) ; } return items . concat ( { handle : item . handle , path : path } ) ; }
Reducing the app's recursive stack
Reducing the app s recursive stack