Skip to main content

pathcat makes URLs easy

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
6 months ago (1.4.0)
T
DoesPathHaveParams

Checks if a path template has parameters. Used to determine the order of arguments in pathcat().

T
DropProtocol

Drops the protocol from the start of a url string

T
ExtractRouteParams

Extracts url parameters from a route template string

f
join

Joins multiple paths together, removing up to 1 duplicate slash between each pair

T
ParamValue

Represents a parameter value that can be used in a URL path.

f
pathcat

Joins a path template with a query object, returning a path with the query appended and parameters replaced.

T
Query

Represents a query object, where each key is a parameter name and each value is a parameter value. If the template has URL params (like /users/:user_id/posts), the query object must contain at least the user_id param

T
QueryValue

Represents a parameter value that can be used in a URL query. This can be either a single value or an array of values.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.