2.0.4 • Published 2 years ago

jsnview v2.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

Demos

PLayground
Demo Codepen

$ npm i jsnview
# or
$ yarn add jsnview

Usage

import jsnview from 'jsnview';
import 'jsnview/build/index.css';

Or include it via jsDelivr CDN (UMD):

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jsnview/build/index.css" />
<script src="https://cdn.jsdelivr.net/npm/jsnview/build/index.min.js"></script>
<!-- Access via global object : window.jsnview -->

Methods && Examples

// Default options
const options = {
  showLen: false,
  showType: false,
  showBrackets: true,
  showFoldmarker: false,
  colors: { boolean: '#ff2929', null: '#ff2929', string: '#690', number: '#905', float: '#002f99' }
}

let data = { name: 'Mike', age: 22 }; 
const treeView = jsnview(data, options); // returns HTMLElement
document.body.appendChild(treeView);

Notes

  • All pull requests are welcome, feel free.

Author

License

Apache License 2.0

2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago