New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ethicdevs/json-tree-view

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethicdevs/json-tree-view

A simple JSON Tree View that renders nodes using HTML5 `details` + `summary`

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@ethicdevs/json-tree-view

NPM MIT License Travis CI Build Average issue resolution time Number of open issues

A simple JSON Tree View that renders nodes using HTML5 details + summary

Installation

Note: @ethicdevs/json-tree-view is not dependent on any package.

$ yarn add @ethicdevs/json-tree-view
# or
$ npm i @ethicdevs/json-tree-view

Usage

import { renderJSONTreeView } from "@ethicdevs/json-tree-view";

const containerEl = document.querySelector("#json-tree-view-container");
const data = {
  a1: 123,
  b1: "xyz",
  c1: [1.2, 3.4, "5.6", false],
  d1: { cid: "WK2WHS", name: "peter", unique: false },
};

// Magic!
const treeViewAPI = renderJSONTreeView(data, containerEl, {
  expanded: true, // Or set it to false so nodes are not expanded by default.
});

// Then control it!
treeViewAPI.toggle();
treeViewAPI.hideChildren();
treeViewAPI.showChildren();

Keywords

FAQs

Package last updated on 20 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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