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