( target: TObject, src: TSource1, src2?: TSource2 )
| 4 | import {assignWith, camelCase, isUndefined} from 'lodash'; |
| 5 | |
| 6 | export 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 | |
| 14 | export function camelCaseObjectKey(object: Record<string, any>): object { |
| 15 | return Object.keys(object).reduce( |
no outgoing calls
no test coverage detected