My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

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?