Notorious Preying Mantis
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    objdiffpublic

    Flattr this git repo

    ObjDiff

    This node library implements a very simple diff algorithm for javascript/json objects

    Installation

    Node

    # npm install objdiff
    

    Browser

    # git clone git://github.com/Gottox/node-objdiff.git
    # cd node-objdiff
    # make build
    

    This compiles a browserbuild version to dist/objdiff

    Usage

    Node

    var objdiff = require('objdiff').objdiff
    objdiff({a:1}, {b:2});

    Browser

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="utf-8" />
            <title></title>
            <script type="text/javascript" src="dist/objdiff.js"></script> 
        </head>
        <body>
            <script type="text/javascript">
                var objdiff = ObjDiff.objdiff
                document.write(JSON.stringify(objdiff({a:1}, {b:2})));
            </script> 
        </body>
    </html>

    Keywords

    none

    install

    npm i objdiff

    Downloadsweekly downloads

    1

    version

    0.1.0

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar