JSPM

ffv-validator

0.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q26399F
  • License MIT

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

Package Exports

  • ffv-validator
  • ffv-validator/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ffv-validator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Welcome to ffv 👋

Version Documentation Maintenance License: MIT

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

🏠 Homepage

Prerequisites

  • npm >=5.5.0
  • node >=8.0.0

Install

npm install ffv-validator

Run tests

npm run test

Example

const fs = require('fs');
const { validate } = require('ffv');

const filename = './download.jpeg';
const readStream = fs.createReadStream(filename, { highWaterMark: 512 });
const wstream = fs.createWriteStream('download-1.png');

const pass = 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