You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
344 B
8 lines
344 B
export default function isPlainObject(value) { |
|
if (typeof value !== 'object' || value === null) { |
|
return false; |
|
} |
|
|
|
const prototype = Object.getPrototypeOf(value); |
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value); |
|
}
|
|
|