mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 01:38:07 +08:00
DISABLE_THIRD_PARTY_CHECK=Adding istanbul-diff to node_modules Bug: chromium:1044881 Change-Id: Ia80f499622132ce9b2c0890147fecdd4530886c7 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2024871 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org>
20 lines
452 B
JavaScript
Executable File
20 lines
452 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const jsondiffpatch = require('..');
|
|
|
|
const fs = require('fs');
|
|
|
|
const fileLeft = process.argv[2];
|
|
const fileRight = process.argv[3];
|
|
|
|
if (!fileLeft || !fileRight) {
|
|
console.log('\n USAGE: jsondiffpatch left.json right.json');
|
|
return;
|
|
}
|
|
|
|
const left = JSON.parse(fs.readFileSync(fileLeft));
|
|
const right = JSON.parse(fs.readFileSync(fileRight));
|
|
|
|
const delta = jsondiffpatch.diff(left, right);
|
|
jsondiffpatch.console.log(delta);
|