@intlayer/core
Version:
Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.
14 lines (12 loc) • 468 B
JavaScript
//#region src/utils/isValidReactElement.ts
/**
* Verifies the object is a ReactElement.
* See https://reactjs.org/docs/react-api.html#isvalidelement
* @param object
* @return True if `object` is a ReactElement.
* @final
*/
const isValidElement = (object) => typeof object === "object" && typeof object?.key !== "undefined" && typeof object?.props !== "undefined";
//#endregion
exports.isValidElement = isValidElement;
//# sourceMappingURL=isValidReactElement.cjs.map