(url, prefix)
| 9 | ]); |
| 10 | |
| 11 | export function matchesPathPrefix(url, prefix) { |
| 12 | return ( |
| 13 | url === prefix || |
| 14 | url.startsWith(prefix + "/") || |
| 15 | url.startsWith(prefix + "?") |
| 16 | ); |
| 17 | } |
| 18 | |
| 19 | export function createRouter(routes, defaultBackend = null) { |
| 20 | const sortedRoutes = Object.entries(routes).sort( |
no outgoing calls
no test coverage detected