MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / rewrite

Function rewrite

frontend/packages/common/src/utils/curl.ts:323–334  ·  view source on GitHub ↗
(args: any[])

Source from the content-addressed store, hash-verified

321
322// eslint-disable-next-line @typescript-eslint/no-explicit-any
323function rewrite(args: any[]) {
324 return args.reduce(function (args, a) {
325 if (0 === a.indexOf('-X')) {
326 args.push('-X')
327 args.push(a.slice(2))
328 } else {
329 args.push(a)
330 }
331
332 return args
333 }, [])
334}
335
336/**
337 * Parse header field.

Callers 1

parseCurlMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected