Write a program using JavaScript (Node) that will compare two json objects and give a score between 0 and 1 as to how similar they are, a score of 1 meaning the objects are identical. There are sample JSON files in the data directory for testing.
To run the tests follow the nexts steps
npm install
npm test
npm install
npm run compare --objA=data/BreweriesMaster.json --objB=data/BreweriesMaster.json
npm run compare --objA=data/BreweriesMaster.json --objB=data/BreweriesSample2.json
To run the script the flags --objA and --objB needs to be given as well as the path to the files.