Socket
Socket
Sign inDemoInstall

react-is

Package Overview
Dependencies
Maintainers
8
Versions
1807
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-is - npm Package Compare versions

Comparing version 0.0.0-4a1072194 to 0.0.0-50b50c26f

8

build-info.json
{
"branch": "master",
"buildNumber": "12928",
"checksum": "7d45248",
"commit": "4a1072194",
"buildNumber": "14970",
"checksum": "32f1c37",
"commit": "50b50c26f",
"environment": "ci",
"reactVersion": "16.6.1-canary-4a1072194"
"reactVersion": "16.8.6-canary-50b50c26f"
}

@@ -1,2 +0,2 @@

/** @license React v0.0.0-4a1072194
/** @license React v0.0.0-50b50c26f
* react-is.development.js

@@ -31,2 +31,4 @@ *

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;

@@ -38,7 +40,11 @@ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;

var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
var REACT_EVENT_COMPONENT_TYPE = hasSymbol ? Symbol.for('react.event_component') : 0xead5;
var REACT_EVENT_TARGET_TYPE = hasSymbol ? Symbol.for('react.event_target') : 0xead6;
// React event targets
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 || 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 === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_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_EVENT_COMPONENT_TYPE || type.$$typeof === REACT_EVENT_TARGET_TYPE);
}

@@ -45,0 +51,0 @@

@@ -1,2 +0,2 @@

/** @license React v0.0.0-4a1072194
/** @license React v0.0.0-50b50c26f
* react-is.production.min.js

@@ -12,5 +12,5 @@ *

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.memo"):
60115,r=b?Symbol.for("react.lazy"):60116;function t(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 h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;
exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};
exports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};
exports.isSuspense=function(a){return t(a)===p};
60115,r=b?Symbol.for("react.lazy"):60116,t=b?Symbol.for("react.event_component"):60117,v=b?Symbol.for("react.event_target"):60118;function w(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 h:return a;default:return u}}case r:case q:case d:return u}}}function x(a){return w(a)===m}exports.typeOf=w;exports.AsyncMode=l;exports.ConcurrentMode=m;
exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===t||a.$$typeof===v)};
exports.isAsyncMode=function(a){return x(a)||w(a)===l};exports.isConcurrentMode=x;exports.isContextConsumer=function(a){return w(a)===k};exports.isContextProvider=function(a){return w(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return w(a)===n};exports.isFragment=function(a){return w(a)===e};exports.isLazy=function(a){return w(a)===r};exports.isMemo=function(a){return w(a)===q};
exports.isPortal=function(a){return w(a)===d};exports.isProfiler=function(a){return w(a)===g};exports.isStrictMode=function(a){return w(a)===f};exports.isSuspense=function(a){return w(a)===p};
{
"name": "react-is",
"version": "0.0.0-4a1072194",
"version": "0.0.0-50b50c26f",
"description": "Brand checking of React Elements.",
"main": "index.js",
"repository": "facebook/react",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-is"
},
"keywords": [

@@ -8,0 +12,0 @@ "react"

@@ -20,2 +20,3 @@ # `react-is`

```js
import React from "react";
import * as ReactIs from "react-is";

@@ -48,12 +49,2 @@

#### ConcurrentMode
```js
import React from "react";
import * as ReactIs from 'react-is';
ReactIs.isConcurrentMode(<React.unstable_ConcurrentMode />); // true
ReactIs.typeOf(<React.unstable_ConcurrentMode />) === ReactIs.ConcurrentMode; // true
```
#### Context

@@ -60,0 +51,0 @@

@@ -1,2 +0,2 @@

/** @license React v0.0.0-4a1072194
/** @license React v0.0.0-50b50c26f
* react-is.development.js

@@ -29,2 +29,4 @@ *

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;

@@ -36,7 +38,11 @@ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;

var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
var REACT_EVENT_COMPONENT_TYPE = hasSymbol ? Symbol.for('react.event_component') : 0xead5;
var REACT_EVENT_TARGET_TYPE = hasSymbol ? Symbol.for('react.event_target') : 0xead6;
// React event targets
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 || 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 === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_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_EVENT_COMPONENT_TYPE || type.$$typeof === REACT_EVENT_TARGET_TYPE);
}

@@ -43,0 +49,0 @@

@@ -1,2 +0,2 @@

/** @license React v0.0.0-4a1072194
/** @license React v0.0.0-50b50c26f
* react-is.production.min.js

@@ -11,4 +11,4 @@ *

typeof Symbol&&Symbol.for,r=d?Symbol.for("react.element"):60103,u=d?Symbol.for("react.portal"):60106,f=d?Symbol.for("react.fragment"):60107,h=d?Symbol.for("react.strict_mode"):60108,g=d?Symbol.for("react.profiler"):60114,n=d?Symbol.for("react.provider"):60109,l=d?Symbol.for("react.context"):60110,t=d?Symbol.for("react.async_mode"):60111,e=d?Symbol.for("react.concurrent_mode"):60111,m=d?Symbol.for("react.forward_ref"):60112,k=d?Symbol.for("react.suspense"):60113,q=d?Symbol.for("react.memo"):60115,
p=d?Symbol.for("react.lazy"):60116;b.typeOf=c;b.AsyncMode=t;b.ConcurrentMode=e;b.ContextConsumer=l;b.ContextProvider=n;b.Element=r;b.ForwardRef=m;b.Fragment=f;b.Lazy=p;b.Memo=q;b.Portal=u;b.Profiler=g;b.StrictMode=h;b.Suspense=k;b.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===f||a===e||a===g||a===h||a===k||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===q||a.$$typeof===n||a.$$typeof===l||a.$$typeof===m)};b.isAsyncMode=function(a){return v(a)||c(a)===
t};b.isConcurrentMode=v;b.isContextConsumer=function(a){return c(a)===l};b.isContextProvider=function(a){return c(a)===n};b.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===r};b.isForwardRef=function(a){return c(a)===m};b.isFragment=function(a){return c(a)===f};b.isLazy=function(a){return c(a)===p};b.isMemo=function(a){return c(a)===q};b.isPortal=function(a){return c(a)===u};b.isProfiler=function(a){return c(a)===g};b.isStrictMode=function(a){return c(a)===h};b.isSuspense=function(a){return c(a)===
k};Object.defineProperty(b,"__esModule",{value:!0})});
p=d?Symbol.for("react.lazy"):60116,w=d?Symbol.for("react.event_component"):60117,x=d?Symbol.for("react.event_target"):60118;b.typeOf=c;b.AsyncMode=t;b.ConcurrentMode=e;b.ContextConsumer=l;b.ContextProvider=n;b.Element=r;b.ForwardRef=m;b.Fragment=f;b.Lazy=p;b.Memo=q;b.Portal=u;b.Profiler=g;b.StrictMode=h;b.Suspense=k;b.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===f||a===e||a===g||a===h||a===k||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===q||a.$$typeof===
n||a.$$typeof===l||a.$$typeof===m||a.$$typeof===w||a.$$typeof===x)};b.isAsyncMode=function(a){return v(a)||c(a)===t};b.isConcurrentMode=v;b.isContextConsumer=function(a){return c(a)===l};b.isContextProvider=function(a){return c(a)===n};b.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===r};b.isForwardRef=function(a){return c(a)===m};b.isFragment=function(a){return c(a)===f};b.isLazy=function(a){return c(a)===p};b.isMemo=function(a){return c(a)===q};b.isPortal=function(a){return c(a)===
u};b.isProfiler=function(a){return c(a)===g};b.isStrictMode=function(a){return c(a)===h};b.isSuspense=function(a){return c(a)===k};Object.defineProperty(b,"__esModule",{value:!0})});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc