MCPcopy Create free account
hub / github.com/middleapi/orpc / toNestPattern

Function toNestPattern

packages/nest/src/utils.ts:4–8  ·  view source on GitHub ↗
(path: HTTPPath)

Source from the content-addressed store, hash-verified

2import { standardizeHTTPPath } from '@orpc/openapi-client/standard'
3
4export function toNestPattern(path: HTTPPath): string {
5 return standardizeHTTPPath(path)
6 .replace(/\/\{\+([^}]+)\}/g, '/*$1')
7 .replace(/\/\{([^}]+)\}/g, '/:$1')
8}

Callers 2

utils.test.tsFile · 0.90
ImplementFunction · 0.90

Calls 2

standardizeHTTPPathFunction · 0.90
replaceMethod · 0.65

Tested by

no test coverage detected