UNPKG

200 BJavaScriptView Raw
1const OBJP = Object.getPrototypeOf;
2const isPlainObject = (x) => {
3 let p;
4 return x != null && typeof x === "object" && ((p = OBJP(x)) === null || OBJP(p) === null);
5};
6export {
7 isPlainObject
8};