MCPcopy Index your code
hub / github.com/subquery/subql / assign

Function assign

packages/node-core/src/utils/object.ts:6–12  ·  view source on GitHub ↗
(
  target: TObject,
  src: TSource1,
  src2?: TSource2
)

Source from the content-addressed store, hash-verified

4import {assignWith, camelCase, isUndefined} from 'lodash';
5
6export function assign<TObject, TSource1, TSource2>(
7 target: TObject,
8 src: TSource1,
9 src2?: TSource2
10): TObject & TSource1 & (TSource2 | undefined) {
11 return assignWith(target, src, src2, (objValue, srcValue) => (isUndefined(srcValue) ? objValue : srcValue));
12}
13
14export function camelCaseObjectKey(object: Record<string, any>): object {
15 return Object.keys(object).reduce(

Callers 4

fromFileMethod · 0.90
rebaseWithArgsMethod · 0.90
constructorMethod · 0.90
mergeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected