commerce/lib/type-guards.ts
2023-08-04 15:03:18 +02:00

4 lines
167 B
TypeScript

export const isObject = (object: unknown): object is Record<string, unknown> => {
return typeof object === 'object' && object !== null && !Array.isArray(object);
};