schema-mapper-differ
v0.4.2
Published
Get a list of changes between 2 schemas.
Downloads
8
Readme
schema-mapper-differ
Get a list of Changes by comparing 2 Projects.
Installation
npm install --save schema-mapper-differ
Usage
var differ = require('schema-mapper-differ');
var oldProjects = {};
var projects = {
'0': {
name: 'demo',
version: 0,
schemas: {
'1': {
name: 'users',
primary: '1',
columns: {
'1': {
name: 'id',
type: 'uuid'
}
}
}
}
}
};
var changes = differ.diffProjects(oldProjects, projects);
console.log(changes);
[
{
change: 'project.create',
projectId: '0',
project: {
name: 'demo',
version: 0,
schemas: {
'1': {
name: 'users',
primary: '1',
columns: {
'1': {
name: 'id',
type: 'uuid'
}
}
}
}
}
}
]
API docs
Licence
MIT