MCPcopy
hub / github.com/TypeStrong/ts-node / assign

Function assign

src/util.ts:29–40  ·  view source on GitHub ↗
(
  initialValue: T,
  ...sources: Array<T>
)

Source from the content-addressed store, hash-verified

27 * @internal
28 */
29export function assign<T extends object>(
30 initialValue: T,
31 ...sources: Array<T>
32): T {
33 for (const source of sources) {
34 for (const key of Object.keys(source)) {
35 const value = (source as any)[key];
36 if (value !== undefined) (initialValue as any)[key] = value;
37 }
38 }
39 return initialValue;
40}
41
42/**
43 * Split a string array of values

Callers 2

findAndReadConfigFunction · 0.90
readConfigFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…