Naughty Pinching Mannequins
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    compare-schemaspublic

    compare-schemas

    Compare two schemas, old and new. Used to determine which columns we should be appending.

    Installation

    $ npm install compare-schemas

    Example

    var a = {
      foo: 'int',
      bar: 'int',
      something: 'varchar(1000)'
    };
     
    var b = {
      foo: 'int',
      baz: 'varchar(1000)',
      bar: 'int',
      some: 'stuff'
    };
     
    var s = compare(a, b);

    yields:

    { all:
       { foo: 'int',
         bar: 'int',
         something: 'varchar(1000)',
         baz: 'varchar(1000)',
         some: 'stuff' },
      new: { baz: 'varchar(1000)', some: 'stuff' },
      old: { foo: 'int', bar: 'int', something: 'varchar(1000)' } }

    License

    MIT

    Keywords

    none

    install

    npm i compare-schemas

    Downloadsweekly downloads

    0

    version

    0.0.2

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar