code: function removeRoutes(app) {
    return function (api, done) {
      if (!api) {
        done(null, false); // no routes to remove
        return
      }
  
      var removedRoutes = _.remove(app._router.stack, function (layer) {
        if (layer.route == undefined) {
          return false;
        } else {
          return api.matchesRoute(layer.route.path, layer.route.methods);
        }
      });
  
      if (removedRoutes && removedRoutes.length > 0) {
        console.log(`removed ${removedRoutes.length} routes`);
      }
  
      done(null, api);
    }
  }
docs: TODO make this lower order This is brittle if changes in layer implementation of express