parent
17583ad4b9
commit
a1c7be94d6
1 changed files with 10 additions and 0 deletions
@ -0,0 +1,10 @@ |
||||
export const isObject = (value: unknown) => { |
||||
const result: { is: boolean; obj: object } = { is: false, obj: {} }; |
||||
|
||||
if (typeof value === 'object' && value !== null) { |
||||
result.is = true; |
||||
result.obj = value; |
||||
} |
||||
|
||||
return result; |
||||
}; |
Loading…
Reference in new issue