How are file changes detected by this library?
If you use FS.watchFile you will run out of file descriptors very quickly?
Is there any timestamp based comparisons using file mtime?
Yes, the built-in watcher uses fs.watchFile exclusively, the same as chokidar. It does pass curr and prev stats objects used for mtime based comparisons.
However, you don't have to use the built-in watcher. One could customize the watcher and use fs.watch instead, but there are numerous platform consistency issues with it.
Or you could build a custom watcher that kept a record of file & directory events from the walker and their stats. Then set its own interval to re-stat the recorded files/directories. It would be slower, but I suppose it could handle more files depending on available memory.
Now has modular watcher support, so you can use watch instead of watchFile. Just pass module: 'watch' as an option. Or optionally create your own module and inject it.