Socket
Socket
Sign inDemoInstall

react-inspector

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-inspector - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

.circleci/config.yml

131

lib/object-inspector/ObjectInspector.js

@@ -71,3 +71,3 @@ 'use strict';

var objectIterator = /*#__PURE__*/_regenerator2.default.mark(function objectIterator(data) {
var shouldIterate, i, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, entry, _entry, k, v, keys, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, propertyName, propertyValue, _propertyValue;
var shouldIterate, dataIsArray, i, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, entry, _entry, k, v, keys, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, propertyName, propertyValue, _propertyValue;

@@ -88,4 +88,8 @@ return _regenerator2.default.wrap(function objectIterator$(_context) {

case 3:
if (!(!Array.isArray(data) && data[Symbol.iterator])) {
_context.next = 40;
dataIsArray = Array.isArray(data);
// iterable objects (except arrays)
if (!(!dataIsArray && data[Symbol.iterator])) {
_context.next = 41;
break;

@@ -98,8 +102,8 @@ }

_iteratorError = undefined;
_context.prev = 8;
_context.prev = 9;
_iterator = data[Symbol.iterator]();
case 10:
case 11:
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
_context.next = 24;
_context.next = 25;
break;

@@ -111,3 +115,3 @@ }

if (!(Array.isArray(entry) && entry.length === 2)) {
_context.next = 18;
_context.next = 19;
break;

@@ -117,3 +121,3 @@ }

_entry = (0, _slicedToArray3.default)(entry, 2), k = _entry[0], v = _entry[1];
_context.next = 16;
_context.next = 17;
return {

@@ -124,8 +128,8 @@ name: k,

case 16:
_context.next = 20;
case 17:
_context.next = 21;
break;
case 18:
_context.next = 20;
case 19:
_context.next = 21;
return {

@@ -136,23 +140,23 @@ name: i.toString(),

case 20:
case 21:
i++;
case 21:
case 22:
_iteratorNormalCompletion = true;
_context.next = 10;
_context.next = 11;
break;
case 24:
_context.next = 30;
case 25:
_context.next = 31;
break;
case 26:
_context.prev = 26;
_context.t0 = _context['catch'](8);
case 27:
_context.prev = 27;
_context.t0 = _context['catch'](9);
_didIteratorError = true;
_iteratorError = _context.t0;
case 30:
_context.prev = 30;
case 31:
_context.prev = 31;
_context.prev = 32;

@@ -163,7 +167,7 @@ if (!_iteratorNormalCompletion && _iterator.return) {

case 33:
_context.prev = 33;
case 34:
_context.prev = 34;
if (!_didIteratorError) {
_context.next = 36;
_context.next = 37;
break;

@@ -174,16 +178,17 @@ }

case 36:
return _context.finish(33);
case 37:
return _context.finish(30);
return _context.finish(34);
case 38:
_context.next = 81;
return _context.finish(31);
case 39:
_context.next = 82;
break;
case 40:
case 41:
keys = Object.getOwnPropertyNames(data);
if (sortObjectKeys === true) {
if (sortObjectKeys === true && !dataIsArray) {
// Array keys should not be sorted in alphabetical order
keys.sort();

@@ -197,8 +202,8 @@ } else if (typeof sortObjectKeys === 'function') {

_iteratorError2 = undefined;
_context.prev = 45;
_context.prev = 46;
_iterator2 = keys[Symbol.iterator]();
case 47:
case 48:
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
_context.next = 64;
_context.next = 65;
break;

@@ -210,3 +215,3 @@ }

if (!data.propertyIsEnumerable(propertyName)) {
_context.next = 55;
_context.next = 56;
break;

@@ -216,3 +221,3 @@ }

propertyValue = data[propertyName];
_context.next = 53;
_context.next = 54;
return {

@@ -223,9 +228,9 @@ name: propertyName || '""',

case 53:
_context.next = 61;
case 54:
_context.next = 62;
break;
case 55:
case 56:
if (!showNonenumerable) {
_context.next = 61;
_context.next = 62;
break;

@@ -246,7 +251,7 @@ }

if (!(_propertyValue !== undefined)) {
_context.next = 61;
_context.next = 62;
break;
}
_context.next = 61;
_context.next = 62;
return {

@@ -258,20 +263,20 @@ name: propertyName,

case 61:
case 62:
_iteratorNormalCompletion2 = true;
_context.next = 47;
_context.next = 48;
break;
case 64:
_context.next = 70;
case 65:
_context.next = 71;
break;
case 66:
_context.prev = 66;
_context.t1 = _context['catch'](45);
case 67:
_context.prev = 67;
_context.t1 = _context['catch'](46);
_didIteratorError2 = true;
_iteratorError2 = _context.t1;
case 70:
_context.prev = 70;
case 71:
_context.prev = 71;
_context.prev = 72;

@@ -282,7 +287,7 @@ if (!_iteratorNormalCompletion2 && _iterator2.return) {

case 73:
_context.prev = 73;
case 74:
_context.prev = 74;
if (!_didIteratorError2) {
_context.next = 76;
_context.next = 77;
break;

@@ -293,15 +298,15 @@ }

case 76:
return _context.finish(73);
case 77:
return _context.finish(70);
return _context.finish(74);
case 78:
return _context.finish(71);
case 79:
if (!(showNonenumerable && data !== Object.prototype /* already added */)) {
_context.next = 81;
_context.next = 82;
break;
}
_context.next = 81;
_context.next = 82;
return {

@@ -313,3 +318,3 @@ name: '__proto__',

case 81:
case 82:
case 'end':

@@ -319,3 +324,3 @@ return _context.stop();

}
}, objectIterator, this, [[8, 26, 30, 38], [31,, 33, 37], [45, 66, 70, 78], [71,, 73, 77]]);
}, objectIterator, this, [[9, 27, 31, 39], [32,, 34, 38], [46, 67, 71, 79], [72,, 74, 78]]);
});

@@ -322,0 +327,0 @@

@@ -101,3 +101,2 @@ 'use strict';

}
if (!object.constructor) {

@@ -110,2 +109,9 @@ return _react2.default.createElement(

}
if (typeof object.constructor.isBuffer === 'function' && object.constructor.isBuffer(object)) {
return _react2.default.createElement(
'span',
null,
'Buffer[' + object.length + ']'
);
}

@@ -112,0 +118,0 @@ return _react2.default.createElement(

{
"name": "react-inspector",
"version": "2.3.0",
"version": "2.3.1",
"description": "Power of Browser DevTools inspectors right inside your React app",

@@ -47,3 +47,4 @@ "keywords": [

"babel-runtime": "^6.26.0",
"is-dom": "^1.0.9"
"is-dom": "^1.0.9",
"prop-types": "^15.6.1"
},

@@ -69,3 +70,2 @@ "devDependencies": {

"prettier": "^1.11.1",
"prop-types": "^15.6.1",
"react": "^16.3.1",

@@ -72,0 +72,0 @@ "react-dom": "^16.3.1",

@@ -55,3 +55,5 @@ # react-inspector

#### `nodeRenderer: PropTypes.func`: Use a custom `nodeRenderer` to render the object properties (optional)
When `sortObjectKeys={true}` is provided, keys of objects are sorted in alphabetical order except for arrays.
#### `nodeRenderer: PropTypes.func`: Use a custom `nodeRenderer` to render the object properties (optional
- Instead of using the default `nodeRenderer`, you can provide a

@@ -146,4 +148,5 @@ custom function for rendering object properties. The _default_

## Notes
## Additional
- If you intend to capture `console.log`s, you may want to look at [`console-feed`](https://www.npmjs.com/package/console-feed).
- `react-object-inspector` package will be deprecated. `<ObjectInspector/>` is now part of the new package `react-inspector`.
- Why inline style? [This document](https://github.com/erikras/react-redux-universal-hot-example/blob/master/docs/InlineStyles.md) summarizes it well.
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