Skip to content

Commit

Permalink
Nested routes + doc refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
JAForbes committed Apr 26, 2024
1 parent ba80b2f commit f25f9fb
Show file tree
Hide file tree
Showing 7 changed files with 1,086 additions and 691 deletions.
8 changes: 4 additions & 4 deletions lib/fromPath.ts
Expand Up @@ -10,16 +10,16 @@ type Mode =
| "collectRest";


export type ParseResult =
Either<Error, { value: Record<string, string>; rest: string; score: number }>

// todo-james this is already single pass / O(n)
// but we could probably scan both the pattern and path
// mutually which could be faster, worth a try?
export function safe(
_path: string,
_pattern: string
): Either<
Error,
{ value: Record<string, string>; rest: string; score: number }
> {
): ParseResult {

if (_path == null ) {
throw new Error('Provided path was null but must be a URL path')
Expand Down

0 comments on commit f25f9fb

Please sign in to comment.