code: function generateStatsdRoutes(stats) {
    var result = {};
    Object.keys(stats).forEach(function(name) {
      var routes = stats[name];
      if (!(routes instanceof Array)) {
        routes = [routes];
      }
      routes.forEach(function(route) {
        result[route.path] = {
          name: name,
          methods: route.method ? route.method : route.methods
        };
      });
  
  
    });
    return result;
  }
docs: Converts input stats estructure to the internal structure. In converts from:
  name: [{path: '', methods: []}]
  
  To:
  path: { methods: [], name: ''}
  
  It also supports the following format:
  
  name: {path: '', method: ''}