{"version":3,"file":"is-empty-object.mjs","names":[],"sources":["../src/is-empty-object.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n                       🗲 Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website:                  https://stormsoftware.com\n Repository:               https://github.com/storm-software/stryke\n Documentation:            https://docs.stormsoftware.com/projects/stryke\n Contact:                  https://stormsoftware.com/contact\n\n SPDX-License-Identifier:  Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/* eslint-disable ts/no-empty-object-type */\n\nimport { isEmpty } from \"./is-empty\";\n\n/**\n * Check if the provided value's type is `{}`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `{}`\n */\nexport const isEmptyObject = (value: unknown): value is {} => {\n  try {\n    return Boolean(value) || Object.keys(value ?? {}).length === 0;\n  } catch {\n    return true;\n  }\n};\n\n/**\n * Check if the provided value's type is `null` or `undefined` or `{}`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `null` or `undefined` or `{}`\n */\nexport const isEmptyOrEmptyObject = (value: unknown) => {\n  try {\n    return isEmpty(value) || isEmptyObject(value);\n  } catch {\n    return true;\n  }\n};\n"],"mappings":";;;;;;;;;AA4BA,MAAa,iBAAiB,UAAgC;AAC5D,KAAI;AACF,SAAO,QAAQ,MAAM,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC,CAAC,WAAW;SACvD;AACN,SAAO;;;;;;;;;AAUX,MAAa,wBAAwB,UAAmB;AACtD,KAAI;AACF,SAAO,QAAQ,MAAM,IAAI,cAAc,MAAM;SACvC;AACN,SAAO"}