MCPcopy Create free account
hub / github.com/Effect-TS/effect / removeTrailingSlash

Function removeTrailingSlash

packages/effect/src/unstable/http/HttpRouter.ts:701–703  ·  view source on GitHub ↗
(
  path: PathInput
)

Source from the content-addressed store, hash-verified

699export type PathInput = `/${string}` | "*"
700
701const removeTrailingSlash = (
702 path: PathInput
703): PathInput => (path.endsWith("/") ? path.slice(0, -1) : path) as any
704
705/**
706 * Adds a path prefix to a route path.

Callers 1

HttpRouter.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected