function(route_array) {
      var app = this;
      $.each(route_array, function(i, route_args) {
        app.route.apply(app, route_args);
      });
      return this;
    }
function(route_array) {
      var app = this;
      $.each(route_array, function(i, route_args) {
        app.route.apply(app, route_args);
      });
      return this;
    }
function ( route_array ) { var app = this ; $ . each ( route_array , function ( i , route_args ) { app . route . apply ( app , route_args ) ; } ) ; return this ; }
`mapRoutes` takes an array of arrays, each array being passed to route() as arguments, this allows for mass definition of routes. Another benefit is this makes it possible/easier to load routes via remote JSON.  ### Example  var app = $.sammy(function() {  this.mapRoutes([ ['get', '#/', function() { this.log('index'); }], // strings in callbacks are looked up as methods on the app ['post', '#/create', 'addUser'], // No verb assumes 'any' as the verb [/dowhatever/, function() { this.log(this.verb, this.path)}]; ]); })
mapRoutes takes an array of arrays each array being passed to route () as arguments this allows for mass definition of routes . Another benefit is this makes it possible / easier to load routes via remote JSON . ### Example var app = $ . sammy ( function () { this . mapRoutes ( [ [ get # / function () { this . log ( index ) ; } ] // strings in callbacks are looked up as methods on the app [ post # / create addUser ] // No verb assumes any as the verb [ / dowhatever / function () { this . log ( this . verb this . path ) } ] ; ] ) ; } )