isjpeg
is that file really (probably) a jpeg‽
Check the first 2 bytes of the file header to see if it's a JPEG
For when you just don't trust file extensions anymore.
Usage
module
npm install isjpeg
var isJpeg =
command line
npm install -g isjpeg
isjpeg ~/Pictures//Users/oli/Pictures/MagrittePipe.jpg is JPEG