(req)
| 60 | }; |
| 61 | |
| 62 | function getPoint(req) { |
| 63 | var url; |
| 64 | if (typeof req === 'string') { |
| 65 | url = { path:req, pathname: req }; |
| 66 | } else { |
| 67 | if (req.method !== 'GET' && req.method !== 'HEAD') { |
| 68 | return null; |
| 69 | } |
| 70 | url = parseurl(req,true); |
| 71 | |
| 72 | } |
| 73 | var point = byPath[url.path] || byPath[url.pathname]; |
| 74 | return point; |
| 75 | } |
| 76 | |
| 77 | |
| 78 | function route(url, fn, filePath) { |
no outgoing calls
no test coverage detected