Skip to content
Myr

Double bang routeMatches() to return bool

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 4a0706f · Browse files · 3 files+41 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+41 added−5 removed

  • tests:+40 added−2 removed
  • other:+1 added−3 removed

3 files+41 added−5 removed

modified:lib/express.core.js+1 added-3 removed
250 unmodified lines
251 routeMatches : function(route, request) {252 if (route.method.toUpperCase() != request.method) return false253 switch (route.path.constructor) {254 case String: return route.path == request.uri.path255 case RegExp: 256 if (captures = request.uri.path.match(route.path))257 return Express.captures = captures255 case RegExp: return !! (Express.captures = request.uri.path.match(route.path))256 }257 },258 259 /**
38 unmodified lines
modified:spec/spec.rhino.js+1 added-1 removed
modified:spec/spec.routing.js+39 added-1 removed