Checks and returns true if value is a POJSO Object (Plain Old JS Object), such as object literal {} or object created by Object.create() etc, but NOT instances (eg new MyClass()).
Unlike z.isRealObject(), it does not return true for instances created by new Xxx or for Array or Function or new String() etc.
Unlike lodash _.isPlainObject(Object.create({})) === false, isPOJSObject() returns true for Object.create({}) and Object.create(null) etc.
Don't even mention typeof or _.isObject() - it returns true for too many things, almost all refs like Array, Function etc!
Checks and returns true if value is a POJSO Object (Plain Old JS Object), such as object literal {} or object created by
Object.create()etc, but NOT instances (egnew MyClass()).Unlike
z.isRealObject(), it does not returntruefor instances created bynew Xxxor forArrayorFunctionornew String()etc.Unlike lodash
_.isPlainObject(Object.create({})) === false,isPOJSObject()returnstrueforObject.create({})andObject.create(null)etc.Don't even mention
typeofor_.isObject()- it returns true for too many things, almost all refs likeArray,Functionetc!See
z.isInstance()for the instance-only checkz.isRealObject()for the most useful object check