fileidentifier
This repo is a library for both Rust and Javascript (Node.js). It does not identify files using file extension but using magic number. So It helps you to check files better.
Installation
How to use
in Rust:
use fs;
use ;
in Node.js:
const fi = require
let file = fs::
console.log // It will print 'png'
// check the file format
console.log // It will print true