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.

13 lines (12 loc) 395 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const isObjectLiteral = (value) => { return (typeof value === "object" && value !== null && !Array.isArray(value) && !(value instanceof Map) && !(value instanceof Set) && !(value instanceof RegExp) && !(value instanceof Date)); }; exports.default = isObjectLiteral;