unjs/rou3

Is there a way to ignore query parameters?

Closed this issue · 1 comments

Environment

Node version: 18.15.0
Package version: 1.0.1

Reproduction

import { createRouter } from 'radix3';

const routes = ['/', '/login'];

const skipRoutes = createRouter({ strictTrailingSlash: false });
routes.forEach((e) => skipRoutes.insert(e, {}));

const result = skipRoutes.lookup('/login?foo=1234&bar=1234');

console.log(result); // null

Describe the bug

The lookup method doesn't match routes with query params with the ones that don't have query params.

Additional context

No response

Logs

No response

pi0 commented

Canceled because of the reasons mentioned in #61 (comment)