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

Function opSet

packages/cli/src/util/dev/transforms.ts:355–374  ·  view source on GitHub ↗
(
  data: TransformData,
  matchedKeys: string[],
  keySelector: KeyRule,
  args: string | string[] | undefined
)

Source from the content-addressed store, hash-verified

353}
354
355function opSet(
356 data: TransformData,
357 matchedKeys: string[],
358 keySelector: KeyRule,
359 args: string | string[] | undefined
360) {
361 for (const key of matchedKeys) {
362 data[key] = args;
363 }
364
365 // create new key from the selector if it's a simple string and no matched keys
366 if (
367 matchedKeys.length === 0 &&
368 typeof keySelector === 'string' &&
369 data[keySelector] === undefined &&
370 !isEmptyArgs(args)
371 ) {
372 data[keySelector] = args;
373 }
374}
375
376function opAppend(
377 data: TransformData,

Callers 1

applyTransformFunction · 0.85

Calls 1

isEmptyArgsFunction · 0.85

Tested by

no test coverage detected