getWithDefault

Function

Gets the value of a property from an object with a default if that prop is undefined

  • getWithDefault(obj: [key: string]: any , prop: string, def: any) : any

Parameters

Parameter Type Default Notes
obj Required [key: string]: any
prop Required string
def Required any

Returns

any

Function defined in packages/common/src/objects/get-with-default.ts:10