Browse files

use the saved instance of slice where applicable in router

  • Loading branch information...
1 parent 26ecd85 commit 18615a96b5f0817eff7499474962ce2b96c2b563 @nrstott committed Feb 5, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/router.js
View
4 lib/router.js
@@ -134,7 +134,7 @@ Router.prototype.after = function(cb) {
*/
Router.prototype.route = function(method, path /*, handlers... */) {
var paramNames, route, originalPath = path
- , args = Array.prototype.slice.call(arguments);
+ , args = slice.call(arguments);
method = args.shift();
path = args.shift();
@@ -273,7 +273,7 @@ Router.prototype.toString = function() {
* @returns {Function} A function that takes a request and executes a stack of JSGI applications.
*/
function stack(/* apps... */) {
- var args = Array.prototype.slice.call(arguments);
+ var args = slice.call(arguments);
function next(req) {
var jsgiApp = args.shift();

0 comments on commit 18615a9

Please sign in to comment.