@uiw/react-json-view
Advanced tools
Comparing version 1.11.0 to 1.11.1
@@ -124,2 +124,5 @@ "use strict"; | ||
_typeStr = 'null'; | ||
} else if (typeof text === 'string' && /^(NaN)$/gi.test(text)) { | ||
text = NaN; | ||
_typeStr = 'NaN'; | ||
} else if (typeof text === 'string' && /^(undefined)$/gi.test(text)) { | ||
@@ -187,3 +190,3 @@ text = undefined; | ||
}); | ||
if (typeStr === 'null' || typeStr === 'undefined') { | ||
if (typeStr === 'null' || typeStr === 'undefined' || type.toLocaleLowerCase() === 'nan') { | ||
typeView = /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {}); | ||
@@ -190,0 +193,0 @@ } |
@@ -60,3 +60,4 @@ "use strict"; | ||
color: 'var(--w-rjv-color, #002b36)', | ||
backgroundColor: 'var(--w-rjv-background-color, #00000000)' | ||
backgroundColor: 'var(--w-rjv-background-color, #00000000)', | ||
fontSize: 13 | ||
}, style); | ||
@@ -63,0 +64,0 @@ var cls = "w-json-view-container w-rjv ".concat(className || ''); |
@@ -221,9 +221,6 @@ "use strict"; | ||
} | ||
if (value === undefined || type === 'NaN') { | ||
if (value === undefined || type.toLocaleLowerCase() === 'nan' || !displayDataTypes) { | ||
typeView = /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {}); | ||
} | ||
var isURL = value instanceof URL; | ||
if (!displayDataTypes) { | ||
typeView = /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {}); | ||
} | ||
color = ((_typeMap$type = typeMap[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.color) || ''; | ||
@@ -230,0 +227,0 @@ var _useState3 = (0, _react.useState)(false), |
@@ -96,2 +96,5 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
_typeStr = 'null'; | ||
} else if (typeof text === 'string' && /^(NaN)$/gi.test(text)) { | ||
text = NaN; | ||
_typeStr = 'NaN'; | ||
} else if (typeof text === 'string' && /^(undefined)$/gi.test(text)) { | ||
@@ -153,3 +156,3 @@ text = undefined; | ||
}); | ||
if (typeStr === 'null' || typeStr === 'undefined') { | ||
if (typeStr === 'null' || typeStr === 'undefined' || type.toLocaleLowerCase() === 'nan') { | ||
typeView = /*#__PURE__*/_jsx(Fragment, {}); | ||
@@ -156,0 +159,0 @@ } |
@@ -22,3 +22,4 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
color: 'var(--w-rjv-color, #002b36)', | ||
backgroundColor: 'var(--w-rjv-background-color, #00000000)' | ||
backgroundColor: 'var(--w-rjv-background-color, #00000000)', | ||
fontSize: 13 | ||
}, style); | ||
@@ -25,0 +26,0 @@ var cls = "w-json-view-container w-rjv " + (className || ''); |
@@ -204,9 +204,6 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
} | ||
if (value === undefined || type === 'NaN') { | ||
if (value === undefined || type.toLocaleLowerCase() === 'nan' || !displayDataTypes) { | ||
typeView = /*#__PURE__*/_jsx(Fragment, {}); | ||
} | ||
var isURL = value instanceof URL; | ||
if (!displayDataTypes) { | ||
typeView = /*#__PURE__*/_jsx(Fragment, {}); | ||
} | ||
color = ((_typeMap$type = typeMap[type]) == null ? void 0 : _typeMap$type.color) || ''; | ||
@@ -213,0 +210,0 @@ var [showTools, setShowTools] = useState(false); |
{ | ||
"name": "@uiw/react-json-view", | ||
"version": "1.11.0", | ||
"version": "1.11.1", | ||
"description": "JSON viewer for react.", | ||
@@ -5,0 +5,0 @@ "main": "cjs/index.js", |
@@ -193,2 +193,3 @@ react-json-view | ||
timer: 0, | ||
nan: NaN, | ||
url: new URL('https://example.com'), | ||
@@ -195,0 +196,0 @@ date: new Date('Tue Sep 13 2022 14:07:44 GMT-0500 (Central Daylight Time)'), |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
209343
4538
831