react-is
Advanced tools
| /** | ||
| * @license React | ||
| * react-is.production.js | ||
| * | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| "use strict"; | ||
| var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), | ||
| REACT_PORTAL_TYPE = Symbol.for("react.portal"), | ||
| REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), | ||
| REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), | ||
| REACT_PROFILER_TYPE = Symbol.for("react.profiler"); | ||
| Symbol.for("react.provider"); | ||
| var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), | ||
| REACT_CONTEXT_TYPE = Symbol.for("react.context"), | ||
| REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), | ||
| REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), | ||
| REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), | ||
| REACT_MEMO_TYPE = Symbol.for("react.memo"), | ||
| REACT_LAZY_TYPE = Symbol.for("react.lazy"), | ||
| REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), | ||
| REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); | ||
| function typeOf(object) { | ||
| if ("object" === typeof object && null !== object) { | ||
| var $$typeof = object.$$typeof; | ||
| switch ($$typeof) { | ||
| case REACT_ELEMENT_TYPE: | ||
| switch (((object = object.type), object)) { | ||
| case REACT_FRAGMENT_TYPE: | ||
| case REACT_PROFILER_TYPE: | ||
| case REACT_STRICT_MODE_TYPE: | ||
| case REACT_SUSPENSE_TYPE: | ||
| case REACT_SUSPENSE_LIST_TYPE: | ||
| return object; | ||
| default: | ||
| switch (((object = object && object.$$typeof), object)) { | ||
| case REACT_CONTEXT_TYPE: | ||
| case REACT_FORWARD_REF_TYPE: | ||
| case REACT_LAZY_TYPE: | ||
| case REACT_MEMO_TYPE: | ||
| return object; | ||
| case REACT_CONSUMER_TYPE: | ||
| return object; | ||
| default: | ||
| return $$typeof; | ||
| } | ||
| } | ||
| case REACT_PORTAL_TYPE: | ||
| return $$typeof; | ||
| } | ||
| } | ||
| } | ||
| exports.ContextConsumer = REACT_CONSUMER_TYPE; | ||
| exports.ContextProvider = REACT_CONTEXT_TYPE; | ||
| exports.Element = REACT_ELEMENT_TYPE; | ||
| exports.ForwardRef = REACT_FORWARD_REF_TYPE; | ||
| exports.Fragment = REACT_FRAGMENT_TYPE; | ||
| exports.Lazy = REACT_LAZY_TYPE; | ||
| exports.Memo = REACT_MEMO_TYPE; | ||
| exports.Portal = REACT_PORTAL_TYPE; | ||
| exports.Profiler = REACT_PROFILER_TYPE; | ||
| exports.StrictMode = REACT_STRICT_MODE_TYPE; | ||
| exports.Suspense = REACT_SUSPENSE_TYPE; | ||
| exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE; | ||
| exports.isContextConsumer = function (object) { | ||
| return typeOf(object) === REACT_CONSUMER_TYPE; | ||
| }; | ||
| exports.isContextProvider = function (object) { | ||
| return typeOf(object) === REACT_CONTEXT_TYPE; | ||
| }; | ||
| exports.isElement = function (object) { | ||
| return ( | ||
| "object" === typeof object && | ||
| null !== object && | ||
| object.$$typeof === REACT_ELEMENT_TYPE | ||
| ); | ||
| }; | ||
| exports.isForwardRef = function (object) { | ||
| return typeOf(object) === REACT_FORWARD_REF_TYPE; | ||
| }; | ||
| exports.isFragment = function (object) { | ||
| return typeOf(object) === REACT_FRAGMENT_TYPE; | ||
| }; | ||
| exports.isLazy = function (object) { | ||
| return typeOf(object) === REACT_LAZY_TYPE; | ||
| }; | ||
| exports.isMemo = function (object) { | ||
| return typeOf(object) === REACT_MEMO_TYPE; | ||
| }; | ||
| exports.isPortal = function (object) { | ||
| return typeOf(object) === REACT_PORTAL_TYPE; | ||
| }; | ||
| exports.isProfiler = function (object) { | ||
| return typeOf(object) === REACT_PROFILER_TYPE; | ||
| }; | ||
| exports.isStrictMode = function (object) { | ||
| return typeOf(object) === REACT_STRICT_MODE_TYPE; | ||
| }; | ||
| exports.isSuspense = function (object) { | ||
| return typeOf(object) === REACT_SUSPENSE_TYPE; | ||
| }; | ||
| exports.isSuspenseList = function (object) { | ||
| return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; | ||
| }; | ||
| exports.isValidElementType = function (type) { | ||
| return "string" === typeof type || | ||
| "function" === typeof type || | ||
| type === REACT_FRAGMENT_TYPE || | ||
| type === REACT_PROFILER_TYPE || | ||
| type === REACT_STRICT_MODE_TYPE || | ||
| type === REACT_SUSPENSE_TYPE || | ||
| type === REACT_SUSPENSE_LIST_TYPE || | ||
| type === REACT_OFFSCREEN_TYPE || | ||
| ("object" === typeof type && | ||
| null !== type && | ||
| (type.$$typeof === REACT_LAZY_TYPE || | ||
| type.$$typeof === REACT_MEMO_TYPE || | ||
| type.$$typeof === REACT_CONTEXT_TYPE || | ||
| type.$$typeof === REACT_CONSUMER_TYPE || | ||
| type.$$typeof === REACT_FORWARD_REF_TYPE || | ||
| type.$$typeof === REACT_CLIENT_REFERENCE || | ||
| void 0 !== type.getModuleId)) | ||
| ? !0 | ||
| : !1; | ||
| }; | ||
| exports.typeOf = typeOf; |
+121
-169
@@ -1,5 +0,6 @@ | ||
| /** @license React v0.0.0-experimental-aae83a4b9 | ||
| /** | ||
| * @license React | ||
| * react-is.development.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
@@ -10,173 +11,124 @@ * This source code is licensed under the MIT license found in the | ||
| 'use strict'; | ||
| if (process.env.NODE_ENV !== "production") { | ||
| (function() { | ||
| 'use strict'; | ||
| // The Symbol used to tag the ReactElement-like types. If there is no native Symbol | ||
| // nor polyfill, then a plain number is used for performance. | ||
| var hasSymbol = typeof Symbol === 'function' && Symbol.for; | ||
| var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; | ||
| var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; | ||
| var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; | ||
| var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; | ||
| var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; | ||
| var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; | ||
| var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary | ||
| // (unstable) APIs that have been removed. Can we remove the symbols? | ||
| var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; | ||
| var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; | ||
| var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; | ||
| var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; | ||
| var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; | ||
| var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; | ||
| var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | ||
| var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; | ||
| var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; | ||
| var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; | ||
| var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; | ||
| function isValidElementType(type) { | ||
| return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. | ||
| type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); | ||
| } | ||
| function typeOf(object) { | ||
| if (typeof object === 'object' && object !== null) { | ||
| var $$typeof = object.$$typeof; | ||
| switch ($$typeof) { | ||
| case REACT_ELEMENT_TYPE: | ||
| var type = object.type; | ||
| switch (type) { | ||
| case REACT_ASYNC_MODE_TYPE: | ||
| case REACT_CONCURRENT_MODE_TYPE: | ||
| case REACT_FRAGMENT_TYPE: | ||
| case REACT_PROFILER_TYPE: | ||
| case REACT_STRICT_MODE_TYPE: | ||
| case REACT_SUSPENSE_TYPE: | ||
| return type; | ||
| default: | ||
| var $$typeofType = type && type.$$typeof; | ||
| switch ($$typeofType) { | ||
| case REACT_CONTEXT_TYPE: | ||
| case REACT_FORWARD_REF_TYPE: | ||
| case REACT_LAZY_TYPE: | ||
| case REACT_MEMO_TYPE: | ||
| case REACT_PROVIDER_TYPE: | ||
| return $$typeofType; | ||
| "use strict"; | ||
| "production" !== process.env.NODE_ENV && | ||
| (function () { | ||
| function typeOf(object) { | ||
| if ("object" === typeof object && null !== object) { | ||
| var $$typeof = object.$$typeof; | ||
| switch ($$typeof) { | ||
| case REACT_ELEMENT_TYPE: | ||
| switch (((object = object.type), object)) { | ||
| case REACT_FRAGMENT_TYPE: | ||
| case REACT_PROFILER_TYPE: | ||
| case REACT_STRICT_MODE_TYPE: | ||
| case REACT_SUSPENSE_TYPE: | ||
| case REACT_SUSPENSE_LIST_TYPE: | ||
| return object; | ||
| default: | ||
| return $$typeof; | ||
| switch (((object = object && object.$$typeof), object)) { | ||
| case REACT_CONTEXT_TYPE: | ||
| case REACT_FORWARD_REF_TYPE: | ||
| case REACT_LAZY_TYPE: | ||
| case REACT_MEMO_TYPE: | ||
| return object; | ||
| case REACT_CONSUMER_TYPE: | ||
| return object; | ||
| default: | ||
| return $$typeof; | ||
| } | ||
| } | ||
| case REACT_PORTAL_TYPE: | ||
| return $$typeof; | ||
| } | ||
| case REACT_PORTAL_TYPE: | ||
| return $$typeof; | ||
| } | ||
| } | ||
| } | ||
| return undefined; | ||
| } // AsyncMode is deprecated along with isAsyncMode | ||
| var AsyncMode = REACT_ASYNC_MODE_TYPE; | ||
| var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | ||
| var ContextConsumer = REACT_CONTEXT_TYPE; | ||
| var ContextProvider = REACT_PROVIDER_TYPE; | ||
| var Element = REACT_ELEMENT_TYPE; | ||
| var ForwardRef = REACT_FORWARD_REF_TYPE; | ||
| var Fragment = REACT_FRAGMENT_TYPE; | ||
| var Lazy = REACT_LAZY_TYPE; | ||
| var Memo = REACT_MEMO_TYPE; | ||
| var Portal = REACT_PORTAL_TYPE; | ||
| var Profiler = REACT_PROFILER_TYPE; | ||
| var StrictMode = REACT_STRICT_MODE_TYPE; | ||
| var Suspense = REACT_SUSPENSE_TYPE; | ||
| var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated | ||
| function isAsyncMode(object) { | ||
| { | ||
| if (!hasWarnedAboutDeprecatedIsAsyncMode) { | ||
| hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint | ||
| console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); | ||
| } | ||
| } | ||
| return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | ||
| } | ||
| function isConcurrentMode(object) { | ||
| return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | ||
| } | ||
| function isContextConsumer(object) { | ||
| return typeOf(object) === REACT_CONTEXT_TYPE; | ||
| } | ||
| function isContextProvider(object) { | ||
| return typeOf(object) === REACT_PROVIDER_TYPE; | ||
| } | ||
| function isElement(object) { | ||
| return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | ||
| } | ||
| function isForwardRef(object) { | ||
| return typeOf(object) === REACT_FORWARD_REF_TYPE; | ||
| } | ||
| function isFragment(object) { | ||
| return typeOf(object) === REACT_FRAGMENT_TYPE; | ||
| } | ||
| function isLazy(object) { | ||
| return typeOf(object) === REACT_LAZY_TYPE; | ||
| } | ||
| function isMemo(object) { | ||
| return typeOf(object) === REACT_MEMO_TYPE; | ||
| } | ||
| function isPortal(object) { | ||
| return typeOf(object) === REACT_PORTAL_TYPE; | ||
| } | ||
| function isProfiler(object) { | ||
| return typeOf(object) === REACT_PROFILER_TYPE; | ||
| } | ||
| function isStrictMode(object) { | ||
| return typeOf(object) === REACT_STRICT_MODE_TYPE; | ||
| } | ||
| function isSuspense(object) { | ||
| return typeOf(object) === REACT_SUSPENSE_TYPE; | ||
| } | ||
| exports.AsyncMode = AsyncMode; | ||
| exports.ConcurrentMode = ConcurrentMode; | ||
| exports.ContextConsumer = ContextConsumer; | ||
| exports.ContextProvider = ContextProvider; | ||
| exports.Element = Element; | ||
| exports.ForwardRef = ForwardRef; | ||
| exports.Fragment = Fragment; | ||
| exports.Lazy = Lazy; | ||
| exports.Memo = Memo; | ||
| exports.Portal = Portal; | ||
| exports.Profiler = Profiler; | ||
| exports.StrictMode = StrictMode; | ||
| exports.Suspense = Suspense; | ||
| exports.isAsyncMode = isAsyncMode; | ||
| exports.isConcurrentMode = isConcurrentMode; | ||
| exports.isContextConsumer = isContextConsumer; | ||
| exports.isContextProvider = isContextProvider; | ||
| exports.isElement = isElement; | ||
| exports.isForwardRef = isForwardRef; | ||
| exports.isFragment = isFragment; | ||
| exports.isLazy = isLazy; | ||
| exports.isMemo = isMemo; | ||
| exports.isPortal = isPortal; | ||
| exports.isProfiler = isProfiler; | ||
| exports.isStrictMode = isStrictMode; | ||
| exports.isSuspense = isSuspense; | ||
| exports.isValidElementType = isValidElementType; | ||
| exports.typeOf = typeOf; | ||
| var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), | ||
| REACT_PORTAL_TYPE = Symbol.for("react.portal"), | ||
| REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), | ||
| REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), | ||
| REACT_PROFILER_TYPE = Symbol.for("react.profiler"); | ||
| Symbol.for("react.provider"); | ||
| var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), | ||
| REACT_CONTEXT_TYPE = Symbol.for("react.context"), | ||
| REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), | ||
| REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), | ||
| REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), | ||
| REACT_MEMO_TYPE = Symbol.for("react.memo"), | ||
| REACT_LAZY_TYPE = Symbol.for("react.lazy"), | ||
| REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), | ||
| REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); | ||
| exports.ContextConsumer = REACT_CONSUMER_TYPE; | ||
| exports.ContextProvider = REACT_CONTEXT_TYPE; | ||
| exports.Element = REACT_ELEMENT_TYPE; | ||
| exports.ForwardRef = REACT_FORWARD_REF_TYPE; | ||
| exports.Fragment = REACT_FRAGMENT_TYPE; | ||
| exports.Lazy = REACT_LAZY_TYPE; | ||
| exports.Memo = REACT_MEMO_TYPE; | ||
| exports.Portal = REACT_PORTAL_TYPE; | ||
| exports.Profiler = REACT_PROFILER_TYPE; | ||
| exports.StrictMode = REACT_STRICT_MODE_TYPE; | ||
| exports.Suspense = REACT_SUSPENSE_TYPE; | ||
| exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE; | ||
| exports.isContextConsumer = function (object) { | ||
| return typeOf(object) === REACT_CONSUMER_TYPE; | ||
| }; | ||
| exports.isContextProvider = function (object) { | ||
| return typeOf(object) === REACT_CONTEXT_TYPE; | ||
| }; | ||
| exports.isElement = function (object) { | ||
| return ( | ||
| "object" === typeof object && | ||
| null !== object && | ||
| object.$$typeof === REACT_ELEMENT_TYPE | ||
| ); | ||
| }; | ||
| exports.isForwardRef = function (object) { | ||
| return typeOf(object) === REACT_FORWARD_REF_TYPE; | ||
| }; | ||
| exports.isFragment = function (object) { | ||
| return typeOf(object) === REACT_FRAGMENT_TYPE; | ||
| }; | ||
| exports.isLazy = function (object) { | ||
| return typeOf(object) === REACT_LAZY_TYPE; | ||
| }; | ||
| exports.isMemo = function (object) { | ||
| return typeOf(object) === REACT_MEMO_TYPE; | ||
| }; | ||
| exports.isPortal = function (object) { | ||
| return typeOf(object) === REACT_PORTAL_TYPE; | ||
| }; | ||
| exports.isProfiler = function (object) { | ||
| return typeOf(object) === REACT_PROFILER_TYPE; | ||
| }; | ||
| exports.isStrictMode = function (object) { | ||
| return typeOf(object) === REACT_STRICT_MODE_TYPE; | ||
| }; | ||
| exports.isSuspense = function (object) { | ||
| return typeOf(object) === REACT_SUSPENSE_TYPE; | ||
| }; | ||
| exports.isSuspenseList = function (object) { | ||
| return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; | ||
| }; | ||
| exports.isValidElementType = function (type) { | ||
| return "string" === typeof type || | ||
| "function" === typeof type || | ||
| type === REACT_FRAGMENT_TYPE || | ||
| type === REACT_PROFILER_TYPE || | ||
| type === REACT_STRICT_MODE_TYPE || | ||
| type === REACT_SUSPENSE_TYPE || | ||
| type === REACT_SUSPENSE_LIST_TYPE || | ||
| type === REACT_OFFSCREEN_TYPE || | ||
| ("object" === typeof type && | ||
| null !== type && | ||
| (type.$$typeof === REACT_LAZY_TYPE || | ||
| type.$$typeof === REACT_MEMO_TYPE || | ||
| type.$$typeof === REACT_CONTEXT_TYPE || | ||
| type.$$typeof === REACT_CONSUMER_TYPE || | ||
| type.$$typeof === REACT_FORWARD_REF_TYPE || | ||
| type.$$typeof === REACT_CLIENT_REFERENCE || | ||
| void 0 !== type.getModuleId)) | ||
| ? !0 | ||
| : !1; | ||
| }; | ||
| exports.typeOf = typeOf; | ||
| })(); | ||
| } |
+1
-1
| 'use strict'; | ||
| if (process.env.NODE_ENV === 'production') { | ||
| module.exports = require('./cjs/react-is.production.min.js'); | ||
| module.exports = require('./cjs/react-is.production.js'); | ||
| } else { | ||
| module.exports = require('./cjs/react-is.development.js'); | ||
| } |
+1
-1
| MIT License | ||
| Copyright (c) Facebook, Inc. and its affiliates. | ||
| Copyright (c) Meta Platforms, Inc. and affiliates. | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
+5
-6
| { | ||
| "name": "react-is", | ||
| "version": "0.0.0-experimental-aae83a4b9", | ||
| "version": "0.0.0-experimental-ab2135c7-20240724", | ||
| "description": "Brand checking of React Elements.", | ||
| "main": "index.js", | ||
| "sideEffects": false, | ||
| "repository": { | ||
@@ -18,11 +19,9 @@ "type": "git", | ||
| }, | ||
| "homepage": "https://reactjs.org/", | ||
| "homepage": "https://react.dev/", | ||
| "files": [ | ||
| "LICENSE", | ||
| "README.md", | ||
| "build-info.json", | ||
| "index.js", | ||
| "cjs/", | ||
| "umd/" | ||
| "cjs/" | ||
| ] | ||
| } | ||
| } |
+0
-1
@@ -43,3 +43,2 @@ # `react-is` | ||
| ReactIs.isValidElementType(Context.Consumer); // true | ||
| ReactIs.isValidElementType(React.createFactory("div")); // true | ||
| ``` | ||
@@ -46,0 +45,0 @@ |
| { | ||
| "branch": "master", | ||
| "buildNumber": "105612", | ||
| "checksum": "b755e17", | ||
| "commit": "aae83a4b9", | ||
| "environment": "ci", | ||
| "reactVersion": "16.13.0-experimental-aae83a4b9" | ||
| } |
| /** @license React v0.0.0-experimental-aae83a4b9 | ||
| * react-is.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| 'use strict';var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b? | ||
| Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119; | ||
| function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d; | ||
| exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t}; | ||
| exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p}; | ||
| exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z; |
| /** @license React v0.0.0-experimental-aae83a4b9 | ||
| * react-is.development.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| 'use strict'; | ||
| (function (global, factory) { | ||
| typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
| typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
| (global = global || self, factory(global.ReactIs = {})); | ||
| }(this, (function (exports) { 'use strict'; | ||
| // The Symbol used to tag the ReactElement-like types. If there is no native Symbol | ||
| // nor polyfill, then a plain number is used for performance. | ||
| var hasSymbol = typeof Symbol === 'function' && Symbol.for; | ||
| var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; | ||
| var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; | ||
| var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; | ||
| var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; | ||
| var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; | ||
| var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; | ||
| var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary | ||
| // (unstable) APIs that have been removed. Can we remove the symbols? | ||
| var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; | ||
| var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; | ||
| var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; | ||
| var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; | ||
| var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; | ||
| var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; | ||
| var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | ||
| var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; | ||
| var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; | ||
| var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; | ||
| var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; | ||
| function isValidElementType(type) { | ||
| return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. | ||
| type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); | ||
| } | ||
| function typeOf(object) { | ||
| if (typeof object === 'object' && object !== null) { | ||
| var $$typeof = object.$$typeof; | ||
| switch ($$typeof) { | ||
| case REACT_ELEMENT_TYPE: | ||
| var type = object.type; | ||
| switch (type) { | ||
| case REACT_ASYNC_MODE_TYPE: | ||
| case REACT_CONCURRENT_MODE_TYPE: | ||
| case REACT_FRAGMENT_TYPE: | ||
| case REACT_PROFILER_TYPE: | ||
| case REACT_STRICT_MODE_TYPE: | ||
| case REACT_SUSPENSE_TYPE: | ||
| return type; | ||
| default: | ||
| var $$typeofType = type && type.$$typeof; | ||
| switch ($$typeofType) { | ||
| case REACT_CONTEXT_TYPE: | ||
| case REACT_FORWARD_REF_TYPE: | ||
| case REACT_LAZY_TYPE: | ||
| case REACT_MEMO_TYPE: | ||
| case REACT_PROVIDER_TYPE: | ||
| return $$typeofType; | ||
| default: | ||
| return $$typeof; | ||
| } | ||
| } | ||
| case REACT_PORTAL_TYPE: | ||
| return $$typeof; | ||
| } | ||
| } | ||
| return undefined; | ||
| } // AsyncMode is deprecated along with isAsyncMode | ||
| var AsyncMode = REACT_ASYNC_MODE_TYPE; | ||
| var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | ||
| var ContextConsumer = REACT_CONTEXT_TYPE; | ||
| var ContextProvider = REACT_PROVIDER_TYPE; | ||
| var Element = REACT_ELEMENT_TYPE; | ||
| var ForwardRef = REACT_FORWARD_REF_TYPE; | ||
| var Fragment = REACT_FRAGMENT_TYPE; | ||
| var Lazy = REACT_LAZY_TYPE; | ||
| var Memo = REACT_MEMO_TYPE; | ||
| var Portal = REACT_PORTAL_TYPE; | ||
| var Profiler = REACT_PROFILER_TYPE; | ||
| var StrictMode = REACT_STRICT_MODE_TYPE; | ||
| var Suspense = REACT_SUSPENSE_TYPE; | ||
| var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated | ||
| function isAsyncMode(object) { | ||
| { | ||
| if (!hasWarnedAboutDeprecatedIsAsyncMode) { | ||
| hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint | ||
| console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); | ||
| } | ||
| } | ||
| return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | ||
| } | ||
| function isConcurrentMode(object) { | ||
| return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | ||
| } | ||
| function isContextConsumer(object) { | ||
| return typeOf(object) === REACT_CONTEXT_TYPE; | ||
| } | ||
| function isContextProvider(object) { | ||
| return typeOf(object) === REACT_PROVIDER_TYPE; | ||
| } | ||
| function isElement(object) { | ||
| return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | ||
| } | ||
| function isForwardRef(object) { | ||
| return typeOf(object) === REACT_FORWARD_REF_TYPE; | ||
| } | ||
| function isFragment(object) { | ||
| return typeOf(object) === REACT_FRAGMENT_TYPE; | ||
| } | ||
| function isLazy(object) { | ||
| return typeOf(object) === REACT_LAZY_TYPE; | ||
| } | ||
| function isMemo(object) { | ||
| return typeOf(object) === REACT_MEMO_TYPE; | ||
| } | ||
| function isPortal(object) { | ||
| return typeOf(object) === REACT_PORTAL_TYPE; | ||
| } | ||
| function isProfiler(object) { | ||
| return typeOf(object) === REACT_PROFILER_TYPE; | ||
| } | ||
| function isStrictMode(object) { | ||
| return typeOf(object) === REACT_STRICT_MODE_TYPE; | ||
| } | ||
| function isSuspense(object) { | ||
| return typeOf(object) === REACT_SUSPENSE_TYPE; | ||
| } | ||
| exports.AsyncMode = AsyncMode; | ||
| exports.ConcurrentMode = ConcurrentMode; | ||
| exports.ContextConsumer = ContextConsumer; | ||
| exports.ContextProvider = ContextProvider; | ||
| exports.Element = Element; | ||
| exports.ForwardRef = ForwardRef; | ||
| exports.Fragment = Fragment; | ||
| exports.Lazy = Lazy; | ||
| exports.Memo = Memo; | ||
| exports.Portal = Portal; | ||
| exports.Profiler = Profiler; | ||
| exports.StrictMode = StrictMode; | ||
| exports.Suspense = Suspense; | ||
| exports.isAsyncMode = isAsyncMode; | ||
| exports.isConcurrentMode = isConcurrentMode; | ||
| exports.isContextConsumer = isContextConsumer; | ||
| exports.isContextProvider = isContextProvider; | ||
| exports.isElement = isElement; | ||
| exports.isForwardRef = isForwardRef; | ||
| exports.isFragment = isFragment; | ||
| exports.isLazy = isLazy; | ||
| exports.isMemo = isMemo; | ||
| exports.isPortal = isPortal; | ||
| exports.isProfiler = isProfiler; | ||
| exports.isStrictMode = isStrictMode; | ||
| exports.isSuspense = isSuspense; | ||
| exports.isValidElementType = isValidElementType; | ||
| exports.typeOf = typeOf; | ||
| }))); |
| /** @license React v0.0.0-experimental-aae83a4b9 | ||
| * react-is.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| 'use strict';(function(b,d){"object"===typeof exports&&"undefined"!==typeof module?d(exports):"function"===typeof define&&define.amd?define(["exports"],d):(b=b||self,d(b.ReactIs={}))})(this,function(b){function d(a){if("object"===typeof a&&null!==a){var b=a.$$typeof;switch(b){case r:switch(a=a.type,a){case t:case e:case f:case g:case h:case k:return a;default:switch(a=a&&a.$$typeof,a){case l:case m:case n:case p:case q:return a;default:return b}}case u:return b}}}function v(a){return d(a)===e}var c= | ||
| "function"===typeof Symbol&&Symbol.for,r=c?Symbol.for("react.element"):60103,u=c?Symbol.for("react.portal"):60106,f=c?Symbol.for("react.fragment"):60107,h=c?Symbol.for("react.strict_mode"):60108,g=c?Symbol.for("react.profiler"):60114,q=c?Symbol.for("react.provider"):60109,l=c?Symbol.for("react.context"):60110,t=c?Symbol.for("react.async_mode"):60111,e=c?Symbol.for("react.concurrent_mode"):60111,m=c?Symbol.for("react.forward_ref"):60112,k=c?Symbol.for("react.suspense"):60113,w=c?Symbol.for("react.suspense_list"): | ||
| 60120,p=c?Symbol.for("react.memo"):60115,n=c?Symbol.for("react.lazy"):60116,x=c?Symbol.for("react.block"):60121,y=c?Symbol.for("react.fundamental"):60117,z=c?Symbol.for("react.responder"):60118,A=c?Symbol.for("react.scope"):60119;b.AsyncMode=t;b.ConcurrentMode=e;b.ContextConsumer=l;b.ContextProvider=q;b.Element=r;b.ForwardRef=m;b.Fragment=f;b.Lazy=n;b.Memo=p;b.Portal=u;b.Profiler=g;b.StrictMode=h;b.Suspense=k;b.isAsyncMode=function(a){return v(a)||d(a)===t};b.isConcurrentMode=v;b.isContextConsumer= | ||
| function(a){return d(a)===l};b.isContextProvider=function(a){return d(a)===q};b.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===r};b.isForwardRef=function(a){return d(a)===m};b.isFragment=function(a){return d(a)===f};b.isLazy=function(a){return d(a)===n};b.isMemo=function(a){return d(a)===p};b.isPortal=function(a){return d(a)===u};b.isProfiler=function(a){return d(a)===g};b.isStrictMode=function(a){return d(a)===h};b.isSuspense=function(a){return d(a)===k};b.isValidElementType= | ||
| function(a){return"string"===typeof a||"function"===typeof a||a===f||a===e||a===g||a===h||a===k||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===n||a.$$typeof===p||a.$$typeof===q||a.$$typeof===l||a.$$typeof===m||a.$$typeof===y||a.$$typeof===z||a.$$typeof===A||a.$$typeof===x)};b.typeOf=d}); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
1
-66.67%13594
-43.52%6
-33.33%267
-29.18%104
-0.95%1
Infinity%