Sign in
Log inSign up

What is the idiomatic JavaScript way to compare two files for equality?

Tom Valtchanovsky's photo
Tom Valtchanovsky
·Nov 4, 2016

One way would be to check for their inode values using fs.stat().

What are a few other ways to achieve this? Is there a NodeJS method, that I should know of; or any third-party modules that you might be using for doing this?