react-is 16.6.2 → 16.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-is",
|
|
3
|
-
"version": "16.6.
|
|
3
|
+
"version": "16.6.3",
|
|
4
4
|
"description": "Brand checking of React Elements.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": "facebook/react",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"umd/"
|
|
21
21
|
],
|
|
22
22
|
"buildInfo": {
|
|
23
|
-
"buildID": "
|
|
24
|
-
"checksum": "
|
|
23
|
+
"buildID": "0c756fb-f7f79fd",
|
|
24
|
+
"checksum": "d94496cd35663b7e3250c3d4a9069d8229b72b27",
|
|
25
25
|
"unstable": false,
|
|
26
26
|
"partial": false,
|
|
27
27
|
"packages": [
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/** @license React v16.6.1
|
|
2
|
+
* react-is.development.js
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
'use strict';
|
|
11
|
+
|
|
12
|
+
(function (global, factory) {
|
|
13
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
14
|
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
15
|
+
(factory((global.ReactIs = {})));
|
|
16
|
+
}(this, (function (exports) { 'use strict';
|
|
17
|
+
|
|
18
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
19
|
+
// nor polyfill, then a plain number is used for performance.
|
|
20
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
21
|
+
|
|
22
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
23
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
24
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
25
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
26
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
27
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
28
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
|
29
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
30
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
31
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
32
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
33
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
34
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
35
|
+
|
|
36
|
+
function isValidElementType(type) {
|
|
37
|
+
return typeof type === 'string' || typeof type === 'function' ||
|
|
38
|
+
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
39
|
+
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);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Forked from fbjs/warning:
|
|
44
|
+
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
|
45
|
+
*
|
|
46
|
+
* Only change is we use console.warn instead of console.error,
|
|
47
|
+
* and do nothing when 'console' is not supported.
|
|
48
|
+
* This really simplifies the code.
|
|
49
|
+
* ---
|
|
50
|
+
* Similar to invariant but only logs a warning if the condition is not met.
|
|
51
|
+
* This can be used to log issues in development environments in critical
|
|
52
|
+
* paths. Removing the logging code for production environments will keep the
|
|
53
|
+
* same logic and follow the same code paths.
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
var lowPriorityWarning = function () {};
|
|
57
|
+
|
|
58
|
+
{
|
|
59
|
+
var printWarning = function (format) {
|
|
60
|
+
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
61
|
+
args[_key - 1] = arguments[_key];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
var argIndex = 0;
|
|
65
|
+
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
|
66
|
+
return args[argIndex++];
|
|
67
|
+
});
|
|
68
|
+
if (typeof console !== 'undefined') {
|
|
69
|
+
console.warn(message);
|
|
70
|
+
}
|
|
71
|
+
try {
|
|
72
|
+
// --- Welcome to debugging React ---
|
|
73
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
74
|
+
// to find the callsite that caused this warning to fire.
|
|
75
|
+
throw new Error(message);
|
|
76
|
+
} catch (x) {}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
lowPriorityWarning = function (condition, format) {
|
|
80
|
+
if (format === undefined) {
|
|
81
|
+
throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
|
|
82
|
+
}
|
|
83
|
+
if (!condition) {
|
|
84
|
+
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
85
|
+
args[_key2 - 2] = arguments[_key2];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
printWarning.apply(undefined, [format].concat(args));
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
var lowPriorityWarning$1 = lowPriorityWarning;
|
|
94
|
+
|
|
95
|
+
function typeOf(object) {
|
|
96
|
+
if (typeof object === 'object' && object !== null) {
|
|
97
|
+
var $$typeof = object.$$typeof;
|
|
98
|
+
|
|
99
|
+
switch ($$typeof) {
|
|
100
|
+
case REACT_ELEMENT_TYPE:
|
|
101
|
+
var type = object.type;
|
|
102
|
+
|
|
103
|
+
switch (type) {
|
|
104
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
105
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
106
|
+
case REACT_FRAGMENT_TYPE:
|
|
107
|
+
case REACT_PROFILER_TYPE:
|
|
108
|
+
case REACT_STRICT_MODE_TYPE:
|
|
109
|
+
return type;
|
|
110
|
+
default:
|
|
111
|
+
var $$typeofType = type && type.$$typeof;
|
|
112
|
+
|
|
113
|
+
switch ($$typeofType) {
|
|
114
|
+
case REACT_CONTEXT_TYPE:
|
|
115
|
+
case REACT_FORWARD_REF_TYPE:
|
|
116
|
+
case REACT_PROVIDER_TYPE:
|
|
117
|
+
return $$typeofType;
|
|
118
|
+
default:
|
|
119
|
+
return $$typeof;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
case REACT_PORTAL_TYPE:
|
|
123
|
+
return $$typeof;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// AsyncMode is deprecated along with isAsyncMode
|
|
131
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
132
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
133
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
134
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
135
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
136
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
137
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
138
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
139
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
140
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
141
|
+
|
|
142
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
143
|
+
|
|
144
|
+
// AsyncMode should be deprecated
|
|
145
|
+
function isAsyncMode(object) {
|
|
146
|
+
{
|
|
147
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
148
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
149
|
+
lowPriorityWarning$1(false, '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.');
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
153
|
+
}
|
|
154
|
+
function isConcurrentMode(object) {
|
|
155
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
156
|
+
}
|
|
157
|
+
function isContextConsumer(object) {
|
|
158
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
159
|
+
}
|
|
160
|
+
function isContextProvider(object) {
|
|
161
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
162
|
+
}
|
|
163
|
+
function isElement(object) {
|
|
164
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
165
|
+
}
|
|
166
|
+
function isForwardRef(object) {
|
|
167
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
168
|
+
}
|
|
169
|
+
function isFragment(object) {
|
|
170
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
171
|
+
}
|
|
172
|
+
function isProfiler(object) {
|
|
173
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
174
|
+
}
|
|
175
|
+
function isPortal(object) {
|
|
176
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
177
|
+
}
|
|
178
|
+
function isStrictMode(object) {
|
|
179
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
exports.typeOf = typeOf;
|
|
183
|
+
exports.AsyncMode = AsyncMode;
|
|
184
|
+
exports.ConcurrentMode = ConcurrentMode;
|
|
185
|
+
exports.ContextConsumer = ContextConsumer;
|
|
186
|
+
exports.ContextProvider = ContextProvider;
|
|
187
|
+
exports.Element = Element;
|
|
188
|
+
exports.ForwardRef = ForwardRef;
|
|
189
|
+
exports.Fragment = Fragment;
|
|
190
|
+
exports.Profiler = Profiler;
|
|
191
|
+
exports.Portal = Portal;
|
|
192
|
+
exports.StrictMode = StrictMode;
|
|
193
|
+
exports.isValidElementType = isValidElementType;
|
|
194
|
+
exports.isAsyncMode = isAsyncMode;
|
|
195
|
+
exports.isConcurrentMode = isConcurrentMode;
|
|
196
|
+
exports.isContextConsumer = isContextConsumer;
|
|
197
|
+
exports.isContextProvider = isContextProvider;
|
|
198
|
+
exports.isElement = isElement;
|
|
199
|
+
exports.isForwardRef = isForwardRef;
|
|
200
|
+
exports.isFragment = isFragment;
|
|
201
|
+
exports.isProfiler = isProfiler;
|
|
202
|
+
exports.isPortal = isPortal;
|
|
203
|
+
exports.isStrictMode = isStrictMode;
|
|
204
|
+
|
|
205
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
206
|
+
|
|
207
|
+
})));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @license React v16.6.1
|
|
2
|
+
* react-is.production.min.js
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
'use strict';(function(b,c){"object"===typeof exports&&"undefined"!==typeof module?c(exports):"function"===typeof define&&define.amd?define(["exports"],c):c(b.ReactIs={})})(this,function(b){function c(a){if("object"===typeof a&&null!==a){var b=a.$$typeof;switch(b){case n:switch(a=a.type,a){case p:case e:case f:case g:case h:return a;default:switch(a=a&&a.$$typeof,a){case k:case l:case m:return a;default:return b}}case q:return b}}}function r(a){return c(a)===e}var d="function"===typeof Symbol&&Symbol.for,
|
|
10
|
+
n=d?Symbol.for("react.element"):60103,q=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,m=d?Symbol.for("react.provider"):60109,k=d?Symbol.for("react.context"):60110,p=d?Symbol.for("react.async_mode"):60111,e=d?Symbol.for("react.concurrent_mode"):60111,l=d?Symbol.for("react.forward_ref"):60112,t=d?Symbol.for("react.suspense"):60113,u=d?Symbol.for("react.memo"):60115,v=d?Symbol.for("react.lazy"):
|
|
11
|
+
60116;b.typeOf=c;b.AsyncMode=p;b.ConcurrentMode=e;b.ContextConsumer=k;b.ContextProvider=m;b.Element=n;b.ForwardRef=l;b.Fragment=f;b.Profiler=g;b.Portal=q;b.StrictMode=h;b.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===f||a===e||a===g||a===h||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===v||a.$$typeof===u||a.$$typeof===m||a.$$typeof===k||a.$$typeof===l)};b.isAsyncMode=function(a){return r(a)||c(a)===p};b.isConcurrentMode=r;b.isContextConsumer=function(a){return c(a)===
|
|
12
|
+
k};b.isContextProvider=function(a){return c(a)===m};b.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===n};b.isForwardRef=function(a){return c(a)===l};b.isFragment=function(a){return c(a)===f};b.isProfiler=function(a){return c(a)===g};b.isPortal=function(a){return c(a)===q};b.isStrictMode=function(a){return c(a)===h};Object.defineProperty(b,"__esModule",{value:!0})});
|