Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@haxtra/xray-react

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@haxtra/xray-react

JavaScript object browser for React.js

  • 0.9.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

xray-react

JavaScript object browser for React.js

Live demo

Screenshot

Install

$ npm i @haxtra/xray-react

Usage

Basic

<XRay obj={myObj} />

Disable header

<XRay obj={myObj} header={false} />

Set custom title

<XRay obj={myObj} title="My title" />

Start minimized

<XRay obj={myObj} minimize />
// same
<XRay obj={myObj} minimize={true} />

Collapse some keys

<XRay obj={myObj} collapse={["key1", "key2"]} />
// collapse nested keys
<XRay obj={myObj} collapse={["key1.sub1", "key1.sub2"]} />

Collapse all top level keys

<XRay obj={myObj} collapse="top" />

Collapse everything

<XRay obj={myObj} collapse />
// same
<XRay obj={myObj} collapse={true} />

Collapse everything except

<XRay obj={myObj} collapseExcept={["key1", "key2"]} />

Interaction

Clickable areas:

  • header title -- show/hide XRay panel
  • property -- toggle display of value/subtree
  • property : right click -- prompt with path to property
  • unknown values -- log undetected object to console

Caveats

  • invisible characters in strings like newline are not displayed
  • proxies are not detected, displayed as standard object
  • promise status is not detected

Other ports

License

MIT

Keywords

FAQs

Package last updated on 20 Apr 2023

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