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

vanilla-jsoneditor

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vanilla-jsoneditor - npm Package Compare versions

Comparing version 0.19.0 to 0.20.0

standalone.js

2

index.d.ts

@@ -860,3 +860,3 @@ import { SvelteComponent } from 'svelte';

*/
declare function onEscape(element: Element, callback: Callback): {
declare function onEscape(element: Element | null, callback: Callback): {
destroy: () => void;

@@ -863,0 +863,0 @@ };

{
"name": "vanilla-jsoneditor",
"description": "A web-based tool to view, edit, format, transform, and validate JSON",
"version": "0.19.0",
"version": "0.20.0",
"homepage": "https://github.com/josdejong/svelte-jsoneditor",

@@ -26,3 +26,5 @@ "repository": {

"./SECURITY.md": "./SECURITY.md",
"./index.js.map": "./index.js.map"
"./index.js.map": "./index.js.map",
"./standalone.js": "./standalone.js",
"./standalone.js.map": "./standalone.js.map"
},

@@ -34,8 +36,29 @@ "files": [

"dependencies": {
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@codemirror/autocomplete": "^6.11.1",
"@codemirror/commands": "^6.3.2",
"@codemirror/lang-json": "^6.0.1",
"@codemirror/language": "^6.9.3",
"@codemirror/lint": "^6.4.2",
"@codemirror/search": "^6.5.5",
"@codemirror/state": "^6.3.3",
"@codemirror/view": "^6.22.1",
"@fortawesome/free-regular-svg-icons": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@replit/codemirror-indentation-markers": "^6.5.0",
"ajv": "^8.12.0",
"codemirror-wrapped-line-indent": "^1.0.0",
"diff-sequences": "^29.6.3",
"immutable-json-patch": "^5.1.3",
"svelte": "^4.2.7"
"jmespath": "^0.16.0",
"json-source-map": "^0.6.1",
"jsonrepair": "^3.4.1",
"lodash-es": "^4.17.21",
"memoize-one": "^6.0.0",
"natural-compare-lite": "^1.4.0",
"sass": "^1.69.5",
"vanilla-picker": "^2.12.2",
"svelte": "^4.2.8"
},
"devDependencies": {}
"devDependencies": {},
"browser": "./standalone.js"
}

@@ -33,4 +33,22 @@ # vanilla-jsoneditor

Remark: for usage in a Svelte project, install `svelte-jsoneditor` instead.
Remark: for usage in a Svelte project, install and use `svelte-jsoneditor` instead of `vanilla-jsoneditor`.
## Use
If you have a setup for your project with a bundler (like Vite, Rollup, or Webpack), it is best to use the default ES import:
```ts
// for use in a React, Vue, or Angular project
import { JSONEditor } from 'vanilla-jsoneditor'
```
If you want to use the library straight in the browser, use the provided standalone ES bundle:
```ts
// for use directly in the browser
import { JSONEditor } from 'vanilla-jsoneditor/standalone.js'
```
The standalone bundle contains all dependencies of `vanilla-jsoneditor`, for example `lodash-es` and `Ajv`. If you use some of these dependencies in your project too, it means that they will be bundled twice in your web application, leading to a needlessly large application size. In general, it is preferable to use the default `import { JSONEditor } from 'vanilla-jsoneditor'` so dependencies can be reused.
## Use (Browser example loading the ES module):

@@ -48,3 +66,3 @@

<script type="module">
import { JSONEditor } from 'vanilla-jsoneditor'
import { JSONEditor } from 'vanilla-jsoneditor/standalone.js'

@@ -89,3 +107,3 @@ // Or use it through a CDN (not recommended for use in production):

```typescript
```tsx
//

@@ -132,3 +150,3 @@ // JSONEditorReact.tsx

```javascript
```jsx
//

@@ -179,3 +197,3 @@ // JSONEditorReact.jsx

```typescript
```tsx
//

@@ -236,3 +254,3 @@ // demo.tsx for use with NextJS

```typescript
```tsx
//

@@ -239,0 +257,0 @@ // TextContent.tsx

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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