diff --git a/src/utils.ts b/src/utils.ts index 2aa9fa6..39b245c 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,12 +1,7 @@ -export const isObject = (value: any) => { - return typeof value === 'object' && value != null && !Array.isArray(value); +export const isObject = (obj: any) => { + return typeof obj === 'object' && obj != null && !Array.isArray(obj); }; export const isObjectWithValue = (obj: any) => { - return ( - typeof obj === 'object' && - obj != null && - !Array.isArray(obj) && - 'value' in obj - ); + return isObject(obj) && 'value' in obj; };