MCPcopy Create free account
hub / github.com/vercel/vercel / generateQueryString

Function generateQueryString

packages/client/src/utils/query-string.ts:4–30  ·  view source on GitHub ↗
(
  clientOptions: VercelClientOptions
)

Source from the content-addressed store, hash-verified

2import { VercelClientOptions } from '../types';
3
4export function generateQueryString(
5 clientOptions: VercelClientOptions
6): string {
7 const options = new URLSearchParams();
8
9 if (clientOptions.teamId) {
10 options.set('teamId', clientOptions.teamId);
11 }
12
13 if (clientOptions.force) {
14 options.set('forceNew', '1');
15 }
16
17 if (clientOptions.withCache) {
18 options.set('withCache', '1');
19 }
20
21 if (clientOptions.skipAutoDetectionConfirmation) {
22 options.set('skipAutoDetectionConfirmation', '1');
23 }
24
25 if (clientOptions.prebuilt) {
26 options.set('prebuilt', '1');
27 }
28
29 return Array.from(options.entries()).length ? `?${options.toString()}` : '';
30}

Callers 1

postDeploymentFunction · 0.90

Calls 2

setMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected