Skip to content

Repository files navigation

Welcome to ffv 👋

VersionDocumentationMaintenanceLicense: MIT

File format validation project is responsible to check if file contents match provided extension

Prerequisites

  • npm >=5.5.0
  • node >=8.0.0

Install

npm install ffv-validator

Run tests

npm run test

Example

constfs=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.');});

Resources

Author

👤 Dimitris Klouvas dimitris.klouvas@gmail.com

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2019 Dimitris Klouvas dimitris.klouvas@gmail.com.
This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator

About

File Format Validation Project

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages