File format validation project is responsible to check if file contents match provided extension
🏠 Homepage
- npm >=5.5.0
- node >=8.0.0
npm install ffv-validatornpm run testconstfs=require('fs');const{ validate }=require('ffv');constfilename='./download.jpeg';constreadStream=fs.createReadStream(filename,{highWaterMark: 512});constwstream=fs.createWriteStream('download-1.png');constpass=validate('jpeg');readStream.pipe(pass).pipe(wstream).on('error',err=>{console.error('Pipeline failed.',err);}).on('close',()=>{console.log('Pipeline succeeded.');});- https://www.garykessler.net/library/file_sigs.html
- https://www.owasp.org/index.php/OWASP_File_Format_Validation_Project
👤 Dimitris Klouvas dimitris.klouvas@gmail.com
- Github: @dimkl
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
Copyright © 2019 Dimitris Klouvas dimitris.klouvas@gmail.com.
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator