UNPKG

typeguru

Version:

TypeGuru is a lightweight TypeScript utility library for type checking. It includes utility functions for checking object literals, plain objects, specific types, and more.

10 lines (9 loc) 325 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const isPlainObject = (value) => { return (typeof value === "object" && value !== null && value.constructor === Object && Object.prototype.toString.call(value) === "[object Object]"); }; exports.default = isPlainObject;