'use strict' ; let fnToString = function ( fn ) : string { return Function . prototype . toString . call ( fn ) ; } ; let objStringValue = fnToString ( Object ) ; param obj returns export default function isPlainObject ( obj ) { if ( ! obj || typeof obj !== 'object' ) { return false ; } const proto = typeof obj . constructor === 'function' ? Object . getPrototypeOf ( obj ) : Object . prototype ; if ( proto === null ) { return true ; } const constructor = proto . constructor ; return typeof constructor === 'function' && constructor instanceof constructor && fnToString ( constructor ) === objStringValue ; }