🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Book a DemoInstallSign in
Socket

vue-json-pretty

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-json-pretty - npm Package Compare versions

Comparing version

to
1.7.0-rc.0

lib/styles.css

11

package.json
{
"name": "vue-json-pretty",
"version": "1.6.7",
"version": "1.7.0-rc.0",
"description": "A JSON tree view component that is easy to use and also supports data selection.",
"author": "leezng <im.leezng@gmail.com>",
"main": "vue-json-pretty.js",
"main": "lib/vue-json-pretty.js",
"scripts": {
"dev": "node build/dev-server.js",
"build": "node build/build.js",
"dist": "cross-env DIST_ENV=true node build/build.js",
"build:example": "cross-env EXAMPLE_ENV=true node build/build.js",
"e2e": "node test/e2e/runner.js",

@@ -83,5 +83,8 @@ "test": "npm run e2e",

"last 5 versions",
"not ie <= 10"
"not ie <= 11"
],
"files": [
"lib"
],
"dependencies": {}
}

@@ -21,4 +21,4 @@ # vue-json-pretty

```js
npm install vue-json-pretty
```bash
npm install vue-json-pretty --save
```

@@ -28,3 +28,5 @@

```html
The CSS file is included separately and needs to be imported manually. You can either import CSS globally in your app (if supported by your framework) or directly from the component.
```vue
<template>

@@ -40,6 +42,6 @@ <div>

</template>
```
```js
<script>
import VueJsonPretty from 'vue-json-pretty'
import 'vue-json-pretty/styles.css';

@@ -51,4 +53,27 @@ export default {

}
</script>
```
## Nuxt.js
1. In `plugins/vue-json-pretty.js`
```
import Vue from 'vue'
import VueJsonPretty from 'vue-json-pretty'
Vue.component("vue-json-pretty", VueJsonPretty);
```
2. In `nuxt.config.js`
```js
css: [
'vue-json-pretty/styles.css'
],
plugins: [
'@/plugins/vue-json-pretty'
],
```
## Props

@@ -75,2 +100,3 @@

| highlightSelectedNode | higher | highlight current node when selected | boolean | true |
| collapsedOnClickBrackets | higher | collapsed control | boolean | true |
| customValueFormatter | higher | a function that can return different html or strings to display for values in the data. | Function(data, key, parent, defaultFormatted) | - |

@@ -84,1 +110,6 @@

| change | triggered when the selected value changed (only the selectableType not null) | (newVal, oldVal) |
## Major Contributors
[![](https://avatars3.githubusercontent.com/u/153197?v=3&s=50)](https://github.com/rchl)
[![](https://avatars1.githubusercontent.com/u/445616?v=3&s=50)](https://github.com/blackmad)