Skip to content

Add operators (?, *, +) to route parameters. #1

@marcodpt

Description

@marcodpt

As a reference we have itty-router, which implements these operators.

The implementation would be something like:

  • ? fills the parameter only if present.
  • * always returns an array to the associated parameter and may be empty.
  • + always returns an array with the parameter associated with at least one element.

The algorithm would dynamically increase the number of routes according to the parameter match and use the current route weight.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions