{"version":3,"file":"isObjectType.js","names":[],"sources":["../src/isObjectType.ts"],"sourcesContent":["import type { NarrowedTo } from \"./internal/types/NarrowedTo\";\n\n/**\n * Checks if the given parameter is of type `\"object\"` via `typeof`, excluding `null`.\n *\n * It's important to note that in JavaScript, many entities are considered objects, like Arrays, Classes, RegExps, Maps, Sets, Dates, URLs, Promise, Errors, and more. Although technically an object too, `null` is not considered an object by this function, so that its easier to narrow nullables.\n *\n * For a more specific check that is limited to plain objects (simple struct/shape/record-like objects), consider using `isPlainObject` instead. For a simpler check that only removes `null` from the type prefer `isNonNull` or `isDefined`.\n *\n * @param data - The variable to be checked for being an object type.\n * @returns The input type, narrowed to only objects.\n * @signature\n *    isObjectType(data)\n * @example\n *    // true\n *    isObjectType({}) //=> true\n *    isObjectType([]) //=> true\n *    isObjectType(Promise.resolve(\"something\")) //=> true\n *    isObjectType(new Date()) //=> true\n *    isObjectType(new Error(\"error\")) //=> true\n *\n *    // false\n *    isObjectType('somethingElse') //=> false\n *    isObjectType(null) //=> false\n * @dataFirst\n * @category Guard\n */\nexport function isObjectType<T>(\n  data: T | object,\n): data is NarrowedTo<T, object> {\n  return typeof data === \"object\" && data !== null;\n}\n"],"mappings":"AA2BA,SAAgB,EACd,EAC+B,CAC/B,OAAO,OAAO,GAAS,YAAY"}