Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions packages/route-pattern/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,18 @@ pattern.match('https://remix.run/assets/styles/main.css');

```ts
class RoutePattern {
readonly source: string;
constructor(source: string);
match(url: string | URL): Match | null;
static matcher(patterns: Array<string | RoutePattern>): Matcher;
}
```

**Match**

```ts
type Match = {
params: Record<string, string>;
}
```

**Matcher**

```ts
type Matcher = {
match(url: string | URL): Match | null;
matchAll(url: string | URL): Array<Match>;
}
params: Record<string, string | undefined>;
};
```

## Concepts
Expand Down Expand Up @@ -196,4 +187,4 @@ let pattern = new RoutePattern('files/:filename.{jpg,png,gif}');

pattern.match('https://remix.run/files/logo.png');
// { params: { filename: 'logo' } }
```
```
2 changes: 1 addition & 1 deletion packages/route-pattern/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mjackson/route-pattern",
"version": "0.1.0",
"version": "0.2.0",
"description": "Route patterns are strings that describe the structure of URLs you want to match",
"author": "Michael Jackson <mjijackson@gmail.com>",
"license": "MIT",
Expand Down
6 changes: 0 additions & 6 deletions packages/route-pattern/src/lib/ast.ts

This file was deleted.

38 changes: 0 additions & 38 deletions packages/route-pattern/src/lib/lex.test.ts

This file was deleted.

65 changes: 0 additions & 65 deletions packages/route-pattern/src/lib/lex.ts

This file was deleted.

21 changes: 0 additions & 21 deletions packages/route-pattern/src/lib/match.test.ts

This file was deleted.

96 changes: 0 additions & 96 deletions packages/route-pattern/src/lib/match.ts

This file was deleted.

Loading