javascript - compare a text file with string and find difference in node.js -


i have text file has information on wifi connections (like ssid, mac no, strength, etc.) in laptop range 2 minutes ago. , run code again , information of current wifi connections in string. want compare text file , string , want know difference. there new wifi connections or not?

please can me or give me piece of code purpose?

as far understand want compare 2 text files (which not javascript, arrays or node.js related). can use online tools diff checker , diffnow, or if have installed svn example provides quite diff tool.

however if question how node.js diff npm module looking easiest solution.

edit:

you can read files using:

fs.readfile(filename, callback) 

and compare characters by:

jsdiff.diffchars(file1str, file2str, callback])