diff-file
v1.0.1
Published
get linux diff file results
Downloads
14
Readme
diff-file
Get linux file diff results. Format the result returned from Linux diff <file1> <file2>
Example
const fileDiff = require('diff-file');
const getId = require('md5');
const result = await fileDiff(
path.join(__dirname, 'newfile.txt'),
path.join(__dirname, 'oldfile.txt'),
getId
);
/*
result = {
raw: {
new: [],
old: []
},
trans: {
id: {
action,
content
}
}
};
*/