Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
react-simple-json-viewer
Advanced tools
A basic lightweight React component for viewing data in an expandable way.
A basic lightweight React (jsx) component for viewing data in an expandable way.
npm install react-simple-json-viewer
Then inside some react component:
import JSONViewer from 'react-simple-json-viewer'
// Place your component as needed
<JSONViewer data={myData}/>
The data
prop passed in can be any object, array, or value.
This library utilises Emotion's css function to generate top level classes for styling. If you look at index.js in /src you will see the default minimal styles applied to the container and children. To override the default styling just use the css
prop when using the component. For example, to change the color of the values:
<JSONViewer data={data} css={{
'span.rsjv-value': {
color: 'purple'
}
}}>
As the library depends on a recent version of emotion, SSR should work out of the box. However depending on your SSR setup, you may need to do something more complicated, in which case please refer to the Emotion SSR docs.
FAQs
A basic lightweight React component for viewing data in an expandable way.
The npm package react-simple-json-viewer receives a total of 77 weekly downloads. As such, react-simple-json-viewer popularity was classified as not popular.
We found that react-simple-json-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.