You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-json-tree

Package Overview
Dependencies
Maintainers
6
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-json-tree - npm Package Compare versions

Comparing version

to
0.20.0

1

lib/getCollectionEntries.js
function getLength(type, collection) {
if (type === 'Object') {
// eslint-disable-next-line @typescript-eslint/ban-types
return Object.keys(collection).length;

@@ -5,0 +4,0 @@ }

2

lib/JSONNestedNode.js

@@ -18,3 +18,3 @@ import React, { useCallback, useState } from 'react';

const { key, value } = entry;
const isCircular = circularCache.indexOf(value) !== -1;
const isCircular = circularCache.includes(value);
childNodes.push(React.createElement(JSONNode, { ...props, postprocessValue, collectionLimit, key: `Node--${key}`, keyPath: [key, ...keyPath], value: postprocessValue(value), circularCache: [...circularCache, value], isCircular: isCircular, hideRoot: false }));

@@ -21,0 +21,0 @@ }

{
"name": "react-json-tree",
"version": "0.19.0",
"version": "0.20.0",
"description": "React JSON Viewer Component, Extracted from redux-devtools",

@@ -34,26 +34,19 @@ "keywords": [

"dependencies": {
"@types/lodash": "^4.17.0",
"@types/lodash": "^4.17.15",
"react-base16-styling": "^0.10.0"
},
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/react": "^18.2.72",
"@types/react-test-renderer": "^18.0.7",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"@types/jest": "^29.5.14",
"@types/react": "^18.3.18",
"@types/react-test-renderer": "^18.3.1",
"jest": "^29.7.0",
"react": "^18.2.0",
"react-test-renderer": "^18.2.0",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.2",
"typescript": "~5.3.3"
"react": "^18.3.1",
"react-test-renderer": "^18.3.1",
"rimraf": "^6.0.1",
"ts-jest": "^29.2.6",
"typescript": "~5.7.3"
},
"peerDependencies": {
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},

@@ -64,3 +57,3 @@ "scripts": {

"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit",

@@ -67,0 +60,0 @@ "prepublish": "pnpm run lint && pnpm run test"

@@ -5,4 +5,3 @@ import type { SortObjectKeys } from './types.js';

if (type === 'Object') {
// eslint-disable-next-line @typescript-eslint/ban-types
return Object.keys(collection as {}).length;
return Object.keys(collection as object).length;
} else if (type === 'Array') {

@@ -9,0 +8,0 @@ return (collection as unknown[]).length;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.