"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPlainObject = isPlainObject;
const plainObjectTag = Object.prototype.toString.call({});
function isPlainObject(val) {
    if (typeof val !== 'object' ||
        !val ||
        Object.prototype.toString.call(val) !== plainObjectTag) {
        return false;
    }
    const proto = Object.getPrototypeOf(val);
    if (proto === null)
        return true;
    if (!Object.prototype.hasOwnProperty.call(proto, 'constructor'))
        return false;
    const ctor = proto.constructor;
    if (typeof ctor !== 'function')
        return false;
    const ctorPrototype = Object.getPrototypeOf(ctor);
    return Object.getPrototypeOf(ctorPrototype) === ctor.prototype;
}
//# sourceMappingURL=utils.js.map