1import { isFunction, isObject, isPlainObject } from 'lodash-es' 3export const module1ToObj = <T extends Record<string, unknown> = Record<string, unknown>>(moodule: object): T => { 4 return Object.fromEntries( 5 Object.entries(moodule).map(([key, val]) => { 6 const finalVal = !isFunction(val) && isObject(val) && !isPlainObject(val) && !Array.isArray(val) 14export const filterObj = <T, U>(objH: Record<string, T>, filterFnc: (value: T, key: string) => [string, U] | null | undefined): Record<string, U> => { 15 return Object.fromEntries( 16 Object.entries(objH).map(([key, val]) => filterFnc(val, key)).filter(Boolean) as [string, U][]