0.0.6 • Published 8 years ago

json-diff-viewer v0.0.6

Weekly downloads
2
License
MIT
Repository
-
Last release
8 years ago

json-diff-viewer

diff viewer for json

npm version Build Status Coverage Status

install

 npm install json-diff-viewer --save

usage

jsonViewer({ left = {}, right = {} }, options)

  • {left, right} 需要diff的2个json
  • options
    • indent int 缩进 default 2
    • space int 空格大小 default 5px,

example

    const jsonViewer = require('json-diff-viewer');
    const x = [{
        a: 1,
        b: 2,
        f: {
            x: 1
        }
    }];
    const y = [{
        a: 1,
        b: 2,
        c: 3,
        d: 4,
        e: {
            x: 1
        }
    }];
    const elemDom = jsonViewer({
        left: x,
        right: y
    }); 

test

    npm test
0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago