Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
@rich-data/viewer
Advanced tools
Readme
This is a React component for JSON viewer, but not only a JSON viewer.
npm install @rich-data/viewer
yarn add @rich-data/viewer
pnpm add @rich-data/viewer
see src/type.ts
import '@rich-data/viewer/theme/base.css'
import { JsonViewer } from '@rich-data/viewer'
const object = { /* my json object */ }
const Component = () => (<JsonViewer value={object}/>)
import '@rich-data/viewer/theme/base.css'
import { JsonViewer, createDataType } from '@rich-data/viewer'
const object = {
// what if I want to inspect a image?
image: 'https://i.imgur.com/1bX5QH6.jpg',
// ... other values
}
const Component = () => (
<JsonViewer
value={object}
// just define it
valueTypes={[
{
is: (value) => typeof value === 'string' && value.startsWith('https://i.imgur.com'),
Component: (props) => <Image height={50} width={50} src={props.value} alt={props.value}/>,
},
// or
createDataType(
(value) => typeof value === 'string' && value.startsWith('https://i.imgur.com'),
(props) => <Image height={50} width={50} src={props.value} alt={props.value}/>,
)
]}
/>
)
export const ocean: NamedColorspace = {
scheme: 'Ocean',
author: 'Chris Kempson (http://chriskempson.com)',
base00: '#2b303b',
base01: '#343d46',
base02: '#4f5b66',
base03: '#65737e',
base04: '#a7adba',
base05: '#c0c5ce',
base06: '#dfe1e8',
base07: '#eff1f5',
base08: '#bf616a',
base09: '#d08770',
base0A: '#ebcb8b',
base0B: '#a3be8c',
base0C: '#96b5b4',
base0D: '#8fa1b3',
base0E: '#b48ead',
base0F: '#ab7967'
}
const Component = () => (
<JsonViewer
value={object}
theme={ocean}
/>
)
<!DOCTYPE html>
<html lang="en">
<body>
<div id="json-viewer"></div>
<script src="https://cdn.jsdelivr.net/npm/@rich-data/viewer"></script>
<script>
new JsonViewer({
value: { /* ... */ }
}).render()
</script>
</body>
</html>
keyRenderer
for customize key renderervalueTypes
for customize any value types you wantlight | dark | base16
Theme supportNext.js
SSRonChange
props allow users to edit valueobject
, Array
, primitive type, even Map
and Set
by default.Copy to Clipboard
on ClickThis package is originally based on mac-s-g/react-json-view.
Also thanks open source projects that make this possible.
This project is licensed under the terms of the MIT license.
FAQs
Interactive Data Viewer
The npm package @rich-data/viewer receives a total of 140 weekly downloads. As such, @rich-data/viewer popularity was classified as not popular.
We found that @rich-data/viewer demonstrated a not healthy version release cadence and project activity because the last version was released 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.