Checks if a value is a Plain Old Javascript Object (POJO)
This function returns false for Array, Map, Set, etc. Basically it only returns true if x is a so called Plain Old Javascript Object.
x
possibly a POJO
true if the value is a Plain Old Javascript Object, false otherwise
isPOJO({}) => trueisPOJO(Object.create(null)) => falseisPOJO([]) => falseisPOJO(new Map()) => falseisPOJO(new Set()) => false Copy
isPOJO({}) => trueisPOJO(Object.create(null)) => falseisPOJO([]) => falseisPOJO(new Map()) => falseisPOJO(new Set()) => false
Checks if a value is a Plain Old Javascript Object (POJO)
This function returns false for Array, Map, Set, etc. Basically it only returns true if
xis a so called Plain Old Javascript Object.