0.0.4 • Published 11 years ago
diff-ini v0.0.4
diff-ini
Compare two INI files for differences. This is both a library and a command-line tool.
Command-Line
Install
npm install -g diff-iniUsage
diff-ini path/to/old.ini path/to/new.iniWhen a key changes:
-key = bad
+key = barWhen a key changes inside of a section:
-section/key = old
+section/key = newWhen a section is erased:
-section/one/key = valueWhen a section is added:
+section/two/key = valueLibrary
Install as a Library
npm install diff-iniUsage
var diff = require('diff-ini');
diff(process.argv[2], process.argv[3], function(error, result) {
if (error) {
console.error('File not found: "%s"', error.path);
} else {
diff.print(result);
}
});API
diff(strOldFile, strNewFile, fnDone)
Calculate the differences between strOldFile and strNewFile. Call fnDone(error, resultArray) when done, or an error occurs.
diff.print(result, log)
Print the differences in a somewhat useful way. Output is sent to process.stdout or log(str) if you define one.
TODO
Probably tons! It's working the way I need it to right now, so let me know if you need something.