Detects when an object is a plain object (like {key: 'value'}) only, excluding everything else that has a typeof result of 'object' (everything that's not a primitive).
{key: 'value'}
typeof
'object'
This is used in mapPrismaValues to detect when
mapPrismaValues
isPlainObject({}); // trueisPlainObject({value: 'key'}); // trueisPlainObject(null); // falseisPlainObject(new RegExp()); // falseisPlainObject(new Date()); // false Copy
isPlainObject({}); // trueisPlainObject({value: 'key'}); // trueisPlainObject(null); // falseisPlainObject(new RegExp()); // falseisPlainObject(new Date()); // false
Detects when an object is a plain object (like
{key: 'value'}
) only, excluding everything else that has atypeof
result of'object'
(everything that's not a primitive).This is used in
mapPrismaValues
to detect when