file-type-validator
A package to check if the file extension is same as its mime type or not
how to use
Use promise .then method to access the result
Eg. isFileValid(file) .then((res) => { /*
Do your action here.
*/
})