source: node_modules/react-is/cjs/react-is.development.js

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 4.9 KB
Line 
1/**
2 * @license React
3 * react-is.development.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */
10
11"use strict";
12"production" !== process.env.NODE_ENV &&
13 (function () {
14 function typeOf(object) {
15 if ("object" === typeof object && null !== object) {
16 var $$typeof = object.$$typeof;
17 switch ($$typeof) {
18 case REACT_ELEMENT_TYPE:
19 switch (((object = object.type), object)) {
20 case REACT_FRAGMENT_TYPE:
21 case REACT_PROFILER_TYPE:
22 case REACT_STRICT_MODE_TYPE:
23 case REACT_SUSPENSE_TYPE:
24 case REACT_SUSPENSE_LIST_TYPE:
25 case REACT_VIEW_TRANSITION_TYPE:
26 return object;
27 default:
28 switch (((object = object && object.$$typeof), object)) {
29 case REACT_CONTEXT_TYPE:
30 case REACT_FORWARD_REF_TYPE:
31 case REACT_LAZY_TYPE:
32 case REACT_MEMO_TYPE:
33 return object;
34 case REACT_CONSUMER_TYPE:
35 return object;
36 default:
37 return $$typeof;
38 }
39 }
40 case REACT_PORTAL_TYPE:
41 return $$typeof;
42 }
43 }
44 }
45 var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
46 REACT_PORTAL_TYPE = Symbol.for("react.portal"),
47 REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
48 REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
49 REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
50 REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
51 REACT_CONTEXT_TYPE = Symbol.for("react.context"),
52 REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
53 REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
54 REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
55 REACT_MEMO_TYPE = Symbol.for("react.memo"),
56 REACT_LAZY_TYPE = Symbol.for("react.lazy"),
57 REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
58 REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
59 exports.ContextConsumer = REACT_CONSUMER_TYPE;
60 exports.ContextProvider = REACT_CONTEXT_TYPE;
61 exports.Element = REACT_ELEMENT_TYPE;
62 exports.ForwardRef = REACT_FORWARD_REF_TYPE;
63 exports.Fragment = REACT_FRAGMENT_TYPE;
64 exports.Lazy = REACT_LAZY_TYPE;
65 exports.Memo = REACT_MEMO_TYPE;
66 exports.Portal = REACT_PORTAL_TYPE;
67 exports.Profiler = REACT_PROFILER_TYPE;
68 exports.StrictMode = REACT_STRICT_MODE_TYPE;
69 exports.Suspense = REACT_SUSPENSE_TYPE;
70 exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
71 exports.isContextConsumer = function (object) {
72 return typeOf(object) === REACT_CONSUMER_TYPE;
73 };
74 exports.isContextProvider = function (object) {
75 return typeOf(object) === REACT_CONTEXT_TYPE;
76 };
77 exports.isElement = function (object) {
78 return (
79 "object" === typeof object &&
80 null !== object &&
81 object.$$typeof === REACT_ELEMENT_TYPE
82 );
83 };
84 exports.isForwardRef = function (object) {
85 return typeOf(object) === REACT_FORWARD_REF_TYPE;
86 };
87 exports.isFragment = function (object) {
88 return typeOf(object) === REACT_FRAGMENT_TYPE;
89 };
90 exports.isLazy = function (object) {
91 return typeOf(object) === REACT_LAZY_TYPE;
92 };
93 exports.isMemo = function (object) {
94 return typeOf(object) === REACT_MEMO_TYPE;
95 };
96 exports.isPortal = function (object) {
97 return typeOf(object) === REACT_PORTAL_TYPE;
98 };
99 exports.isProfiler = function (object) {
100 return typeOf(object) === REACT_PROFILER_TYPE;
101 };
102 exports.isStrictMode = function (object) {
103 return typeOf(object) === REACT_STRICT_MODE_TYPE;
104 };
105 exports.isSuspense = function (object) {
106 return typeOf(object) === REACT_SUSPENSE_TYPE;
107 };
108 exports.isSuspenseList = function (object) {
109 return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
110 };
111 exports.isValidElementType = function (type) {
112 return "string" === typeof type ||
113 "function" === typeof type ||
114 type === REACT_FRAGMENT_TYPE ||
115 type === REACT_PROFILER_TYPE ||
116 type === REACT_STRICT_MODE_TYPE ||
117 type === REACT_SUSPENSE_TYPE ||
118 type === REACT_SUSPENSE_LIST_TYPE ||
119 ("object" === typeof type &&
120 null !== type &&
121 (type.$$typeof === REACT_LAZY_TYPE ||
122 type.$$typeof === REACT_MEMO_TYPE ||
123 type.$$typeof === REACT_CONTEXT_TYPE ||
124 type.$$typeof === REACT_CONSUMER_TYPE ||
125 type.$$typeof === REACT_FORWARD_REF_TYPE ||
126 type.$$typeof === REACT_CLIENT_REFERENCE ||
127 void 0 !== type.getModuleId))
128 ? !0
129 : !1;
130 };
131 exports.typeOf = typeOf;
132 })();
Note: See TracBrowser for help on using the repository browser.